I have an vb 6.0 application which is using C++ DLL's. Functions made in C++ DLL are working fine in my vb6.0 code.
But now i have converted my application from vb 6.0 into vb.net 2005. Some functions of c++ are working fine. But some functions are not working properly.
Private Declare Function get_version Lib "Classic_Ind_MC.dll" () As uds
I am using above line to declare the function of my dll. And my code on button click event is shown below:
Private Sub CmdGetVersion_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CmdGetVersion.Click
Dim Struct_Info As uds
Dim Data As String
Dim i1 As Short
Struct_Info = get_version()
If Struct_Info.status = 0 Then
Data = Struct_Info.Data
write_info("Size of Data is -:" & Struct_Info.size_Renamed)
write_info("Version Not Getted")
Bold line in code is showing that i am calling get_version() function of dll.
But i am getting error on this above bold line.
The error is :Method's type signature is not PInvoke compatible.
Please provide me proper syntax solution of this error. I am new to vb.net.
Wait for your reply
Star Link Communication Pvt. Ltd. A19 Okhla, Phase-I New Delhi 110020 India