Debugging CF2.0 applications with VS2003

  • Thread starter Thread starter James Salter
  • Start date Start date
J

James Salter

Hi,

Is it supposed to be possible to debug a CF2.0 app with VS2003?

my vs freezes upon launching the debugger. I am aware that vs2003 is not
supported, just wondering if this flatly cannot work or not.

Thanks

James
 
OK, thanks.

The reason I ask is that I'm attempting to receive callbacks from a C
DLL, which is unsupported by 1.0 as you know.

In light of this, I'll use SendMessage for communication, i.e.

void msgWrapperCallback (int type, const wchar_t* mac, const wchar_t*
ssid, int rssi, int wep, int inf) {
struct WiFiScan_t ws;
ws.mac = mac;
ws.ssid = ssid;
ws.rssi = rssi;
ws.wep = wep;
ws.inf = inf;

SendMessage(g_hwnd, WM_WIFISCAN, (WPARAM)type, (LPARAM)&ws);
}

And I'll use the opennetcf messagefilter to receive that.

I've not tried this before, though, so my only question is, how does one
cast an LPARAM to a struct in C#?

James
 
I've not tried this before, though, so my only question is, how does one
cast an LPARAM to a struct in C#?

You can use the Marshal.PtrToStructure for that:

MYSTRUCT strVal = (MYSTRUCT)Marshal.PtrToStructure(lParam, typeof(MYSTRUCT));
 
Back
Top