L
Lee Crabtree
I have several unmanaged struct types that I've created equivalent managed
struct types for. How do I marshal the managed structs into their unmanaged
versions and vice versa?
Here's a quick example of what I'm working with:
unmanaged C++:
typedef struct _UStruct
{
UCHAR length;
USHORT type;
}UStruct;
and the managed version:
[StructLayout(LayoutKind::Sequential, Pack=1)]
__value public struct _M_UStruct
{
unsigned char length;
unsigned short type;
};
Lee
struct types for. How do I marshal the managed structs into their unmanaged
versions and vice versa?
Here's a quick example of what I'm working with:
unmanaged C++:
typedef struct _UStruct
{
UCHAR length;
USHORT type;
}UStruct;
and the managed version:
[StructLayout(LayoutKind::Sequential, Pack=1)]
__value public struct _M_UStruct
{
unsigned char length;
unsigned short type;
};
Lee