I'm having trouble getting the correct syntax for passing a structure from C++ to VB .NET.
I have a VB .Net DLL program with the following code:
[code=vb]
Public Structure testParams
Public iFirst As Integer
Public iSecond As Integer
End Structure
Public Class clsKpdUI
Public Function ShowForm(ByVal Param1 As testParams) As Integer
' Code
End Function
End Class
[/code]
I have C++ program with the following code:
[code=c]
struct testParams {
int iFirst;
int iSecond;
};
kpdUI::clsKpdUI myUI;
testParams tp;
tp.iFirst = 4;
tp.iSecond = 3;
myintR = myUI.ShowForm3( tp);
[/code]
When I try to compile the C++ code, I get the following Error:
Error 1 error C2664: 'kpdUI::clsKpdU I::ShowForm' : cannot convert parameter 1 from 'testParams' to 'kpdUI::testPar ams' c:\test\Form1.h 133 TestKpdUIcpp
How do I correct this error?
Thank,
Gary
I have a VB .Net DLL program with the following code:
[code=vb]
Public Structure testParams
Public iFirst As Integer
Public iSecond As Integer
End Structure
Public Class clsKpdUI
Public Function ShowForm(ByVal Param1 As testParams) As Integer
' Code
End Function
End Class
[/code]
I have C++ program with the following code:
[code=c]
struct testParams {
int iFirst;
int iSecond;
};
kpdUI::clsKpdUI myUI;
testParams tp;
tp.iFirst = 4;
tp.iSecond = 3;
myintR = myUI.ShowForm3( tp);
[/code]
When I try to compile the C++ code, I get the following Error:
Error 1 error C2664: 'kpdUI::clsKpdU I::ShowForm' : cannot convert parameter 1 from 'testParams' to 'kpdUI::testPar ams' c:\test\Form1.h 133 TestKpdUIcpp
How do I correct this error?
Thank,
Gary
Comment