J
jeroen
Question,
I spend this day in trying to convert the following structures to c# for use
in a p/invoke but i'm keep getting a system.notsupportedexception which
means that there is something wrong with my c# code. Expecially the static
TCHAR array gives me a headache, frankly i'm not sure how to do it in c#.
Anybody got an idea ?
thanks in advance Jeroen
typedef struct _CONNMGR_DESTINATION_INFO {
GUID guid;
TCHAR szDescription[128];
} CONNMGR_DESTINATION_INFO;
typedef struct _CONNMGR_CONNECTIONINFO {
DWORD cbSize;
DWORD dwParams;
DWORD dwFlags;
DWORD dwPriority;
BOOL bExclusive;
BOOL bDisabled;
GUID guidDestNet;
HWND hWnd;
UINT uMsg;
LPARAM lParam;
ULONG ulMaxCost;
ULONG ulMinRcvBw;
ULONG ulMaxConnLatency;
} CONNMGR_CONNECTIONINFO;
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
I spend this day in trying to convert the following structures to c# for use
in a p/invoke but i'm keep getting a system.notsupportedexception which
means that there is something wrong with my c# code. Expecially the static
TCHAR array gives me a headache, frankly i'm not sure how to do it in c#.
Anybody got an idea ?
thanks in advance Jeroen
typedef struct _CONNMGR_DESTINATION_INFO {
GUID guid;
TCHAR szDescription[128];
} CONNMGR_DESTINATION_INFO;
typedef struct _CONNMGR_CONNECTIONINFO {
DWORD cbSize;
DWORD dwParams;
DWORD dwFlags;
DWORD dwPriority;
BOOL bExclusive;
BOOL bDisabled;
GUID guidDestNet;
HWND hWnd;
UINT uMsg;
LPARAM lParam;
ULONG ulMaxCost;
ULONG ulMinRcvBw;
ULONG ulMaxConnLatency;
} CONNMGR_CONNECTIONINFO;
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;