How to convert intPtr m->LParam to PDEV_BROADCAST_HDR
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
In my wndProc(Message* m) function PDEV_BROADCAST_HDR lpdb; case DBT_DEVICEARRIVAL: // Handle device arrival // treat lParam a pointer to a standard structure DEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)(m->LParam); // check if an volume device arrival if (lpdb->dbch_devicetype == DBT_DEVTYP_VOLUME) I received error: error C2440: 'type cast' : cannot convert from 'System::IntPtr' to 'PDEV_BROADCAST_HDR' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called How to resolve it????