Debugging CF2.0 applications with VS2003

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
 
J

James Salter

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
 
G

Guest

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));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top