avatar
how to use old DLL in VB .NET?# DotNet - 窗口里的风景
G*T
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
avatar
w*w
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

avatar
G*T
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.

avatar
G*T
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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。