Hi I am trying to convert the C/C++ Strcut to C#
C/C++ Struct looks like:
typedef struct _NDISUIO_QUERY_OID
{
NDIS_OID Oid;
PTCHAR ptcDeviceName;
UCHAR Data[sizeof(ULONG)];
} NDISUIO_QUERY_OID, *PNDISUIO_QUERY_OID;
My C# Struct is:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct _NDISUIO_QUERY_OID
{
public uint Oid;
[MarshalAs(UnmanagedType.LPWStr)]
public string ptcDeviceName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8*sizeof(uint))]
public string Data;
};
I was bit doubtful about the converted structure, can anyone clarify me about this conversion??
If possible can anyone please tell me any tutorials or some references that are useful for conversion of data types or structures from c/c++ to C#.Net CF.
Thanks :)