B
Bully
Hi
I have created a simple COM Class in VB.Net containing a simple
structure and function:
Public Structure MyStruct
Dim Param1 As Byte
End Structure
Public Function ShowStruct(ByRef MyPassedStruct As MyStruct)
' Do nothing
End Function
In VB6, I want to call the .Net function and pass the structure.
Public Type MyStruct
Param1 As Byte
End Type
Private Sub Command1_Click()
Dim netCall as New netDll
Dim testStruct as MyStruct
testStruct.Param1 = 10
Call netCall.ShowStruct(testStruct)
End Sub
When I try and comple my VB app it gives me an error saying 'ByRef
Argument Mismatch'. What am I doing wrong?
I have managed to pass integers and strings ok, I'm just having a
problem with structures.
Thanks
Jon
I have created a simple COM Class in VB.Net containing a simple
structure and function:
Public Structure MyStruct
Dim Param1 As Byte
End Structure
Public Function ShowStruct(ByRef MyPassedStruct As MyStruct)
' Do nothing
End Function
In VB6, I want to call the .Net function and pass the structure.
Public Type MyStruct
Param1 As Byte
End Type
Private Sub Command1_Click()
Dim netCall as New netDll
Dim testStruct as MyStruct
testStruct.Param1 = 10
Call netCall.ShowStruct(testStruct)
End Sub
When I try and comple my VB app it gives me an error saying 'ByRef
Argument Mismatch'. What am I doing wrong?
I have managed to pass integers and strings ok, I'm just having a
problem with structures.
Thanks
Jon