How to call dll made from VS C++ in VB.NET?
Posted on 2008-10-25
I have implemented a dll by using VS C++(2005) ClassLibrary Project as below:
public ref class MyTest
bool GetString(const char *in, char *out, const unsigned char *key);
From VB.NET project I have add reference to my dll.
and I am using my class from dll as below:
Dim myClass As New MyTestLib.MyTest
Dim b As Boolean
Dim sIn As String
Dim sOut As String
Dim sKey As String
sIn = "Test String"
sKey ="Test Key"
b = false
b = myClass.GetString(sIn, sOut, sKey)
It show me error:
Form1.vb(205) : error BC30657: 'GetString' has a return type that is not supported or parameter types that are not supported.
Can you help me what this error and how to solve the problem?
I am not .NET programmer but I want call dll that I made from VS2005 in to vb.NET,
so how to correct my code above to let me can call in vb.NET project?
Please help me soon
Thank in advance.