J
Joe HM
Hello -
I have an Ada *.dll that is called from withing VB.NET. The following
works ...
Public Declare Sub XXX Lib "X.dll" (ByRef XArgument As XStructure)
<StructLayout(LayoutKind.Explicit)> _
Structure XStructure
<FieldOffset(0)> Dim A As Single
<FieldOffset(4)> Dim B As Single
...
End Structure
.... but I would like to use a Class to utilize inheritance. Here is
what does not work ...
Public Declare Sub XXX Lib "X.dll" (ByRef XArgument As XClassBase)
Class XClassBase
End Class
<StructLayout(LayoutKind.Explicit)> _
Class XClassDerived
Inherits XClassBase
<FieldOffset(0)> Dim A As Single
<FieldOffset(4)> Dim B As Single
...
End Class
.... when I call it using ...
Dim lDummy as New XClassDerived
XXX(CType(lDummy, XClassDerived))
I assume that the Class stores some additional data that confuses the
interface to teh X.dll? Is there any way to make this work???
Thanks!
Joe
I have an Ada *.dll that is called from withing VB.NET. The following
works ...
Public Declare Sub XXX Lib "X.dll" (ByRef XArgument As XStructure)
<StructLayout(LayoutKind.Explicit)> _
Structure XStructure
<FieldOffset(0)> Dim A As Single
<FieldOffset(4)> Dim B As Single
...
End Structure
.... but I would like to use a Class to utilize inheritance. Here is
what does not work ...
Public Declare Sub XXX Lib "X.dll" (ByRef XArgument As XClassBase)
Class XClassBase
End Class
<StructLayout(LayoutKind.Explicit)> _
Class XClassDerived
Inherits XClassBase
<FieldOffset(0)> Dim A As Single
<FieldOffset(4)> Dim B As Single
...
End Class
.... when I call it using ...
Dim lDummy as New XClassDerived
XXX(CType(lDummy, XClassDerived))
I assume that the Class stores some additional data that confuses the
interface to teh X.dll? Is there any way to make this work???
Thanks!
Joe