hi! there im new in programming in VB.NET. i want to translate my VB code into VB.NET(VS.NET 2003)..
in my VB project i had this which it works perfectly
- a module called chain.bas
- a test.dll
in my chain.bas i had this
Code:Global Const ALGO_1 = 0 Global Const ALGO_2 = 1 Global Const ALGO_3 = 3 Global Const DATA_A = 1 Global Const DATA_B = 2 Declare Function Chain_A Lib "test.dll" (ByRef Data As Any, ByRef key As Any, ByVal Single As Integer, ByVal Blocks As Long, ByVal method As Long) As Long Declare Function Chain_B Lib "test.dll" (ByRef arc As Any, ByRef Data As Any, ByRef key As Any, ByVal Blocks As Long) As Long Declare Function Chain_C Lib "test.dll" (ByRef arc As Any, ByRef Data As Any, ByRef key As Any, ByVal Blocks As Long) As Long
i had this in commandbutton
but when it try to convert it in VB.NETCode:Dim Data(1 To 8) As Byte Dim key(1 To 8) As Byte ' ** some codes ** Call Chain_A(Data(1), key(1), ALGO_1, 1, DATA_A)
- a class called chain.vb
- a test.dll
in my commandbutton ive encuntered an error An unhandled exception of type 'System.DllNotFoundException' occurred in ChainDES.exeCode:public Class chain Public Const ALGO_1 = 0 Public Const ALGO_2 = 1 Public Const ALGO_3 = 3 Public Const DATA_A = 1 Public Const DATA_B = 2 Declare Function Chain_A Lib "test.dll" (ByRef Data As Object, ByRef key As Object, ByVal TripleDES As Short, ByVal Blocks As Integer, ByVal method As Integer) As Integer Declare Function Chain_B Lib "test.dll" (ByRef arc As Object, ByRef Data As Object, ByRef key As Object, ByVal Blocks As Integer) As Integer Declare Function Chain_C Lib "test.dll" (ByRef arc As Object, ByRef Data As Object, ByRef key As Object, ByVal Blocks As Integer) As Integer End Class
it says that Unable to load DLL (test.dll).
Code:Dim Data(8) As Byte Dim key(8) As Byte ' ** some codes ** Call chain.Chain_A(Data(1), key(1), chain.ALGO_1, 1, chain.DATA_A)
kindly help regarding this matter.. im getting stuck in here.. i appreciate you guys fpr helping me..




Reply With Quote