Okay, the compiling sounds like I thought. For some
reason it's not working but that's another story
What I was getting at with the char id[30] was if it is
in a C struct can my VB Structure contain a managed class
with the Byte array as you were suggesting as well as any
other types I need, like the StringPtr example?
so lets say C struct like before:
typedef struct GetLongRTS *GetLongRT;
struct GetLongRTS{
char sval[30];
LONG lval;
};
VB Structure as before:
Public Structure GetLongRTS
Public sval As **CharArrayClass**
Public lval As Integer
End Structure
Where CharArrayClass contains a byte array for holding
the data.
then:
Dim ptr As IntPtr = DBAccessFuncDecl.GetLongVal()
Dim obj As DBAccessFuncDecl.GetLongRTS
obj = CType(Marshal.PtrToStructure(ptr, GetType
(DBAccessFuncDecl.GetLongRTS)),DBAccessFuncDecl.GetLongRTS
)
Or rather a class GetLongRTS which contains a byte array
internally and methods like getSval() return the expected
String and getLval() returns the expected long?
then:
the same as above.
Am I understanding what you're saying or am I way off?
Denis