Hello,
i want to use the unmanaged code in CSharp.
the structure defined in the cpp dll is
typedef struct XTRAP_CLIENT_LIST
{
char prnNetAdd[100];
char hostAddress[100];
XTYPE_ADDESS ClientType;
struct XTRAP_CLIENT_LIST* next;
} XTRAP_CLIENT_LIST;
typedef XTRAP_CLIENT_LIST FAR * LPXTRAP_CLIENT_LIST;
how to define this structure in c# .net. and how to use the function which is using the structure.
i have defined the structure as
public struct XTRAP_CLIENT_LIST
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
public string prnNetAdd;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
public string hostAddress;
public XTYPE_ADDESS ClientType;
public IntPtr next;
}
But i don't know how to use use the IntPtr in my function.