G**T 发帖数: 388 | 1 I have a dll which works in VB6. Now I need use it in VB .NET, what I should
do?
The old DLL is:
Private Declare Function TestData Lib "Test.dll" Alias "TESTDATA" (ByVal
Source As String, ByVal Dest As String) As Long
Now I want to use it in Vb .NET. I checked MSDN and tried this:
_
Public Shared Function TestData(ByVal Source As String, _
ByVal Dest As String) As Long
End Function
......
Dim ret As Long
ret = TestData(strSource, strDest)
the TestD |
w**w 发帖数: 5391 | 2 I have some COM dll working well in .NET. You may try to add reference(add your
dll); imports dll namespace.
【在 G**T 的大作中提到】 : I have a dll which works in VB6. Now I need use it in VB .NET, what I should : do? : The old DLL is: : Private Declare Function TestData Lib "Test.dll" Alias "TESTDATA" (ByVal : Source As String, ByVal Dest As String) As Long : Now I want to use it in Vb .NET. I checked MSDN and tried this: : _ : Public Shared Function TestData(ByVal Source As String, _ : ByVal Dest As String) As Long : End Function
|
G**T 发帖数: 388 | 3
your
got a solution: change all 'Long' to 'Interge'.
then it works!!!!!!!!!!!!!
but I do not know why. weird. maybe just a bug.
hehe
should
compile
【在 w**w 的大作中提到】 : I have some COM dll working well in .NET. You may try to add reference(add your : dll); imports dll namespace.
|
G**T 发帖数: 388 | 4
I just tried some other DLLs, they work in this way too. weird.
【在 G**T 的大作中提到】 : : your : got a solution: change all 'Long' to 'Interge'. : then it works!!!!!!!!!!!!! : but I do not know why. weird. maybe just a bug. : hehe : should : compile
|