المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : WM_DEVICECHANGE Problem



C++ Programming
03-07-2011, 06:40 AM
LRESULT CALLBACK devDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{

switch(msg)
{
case WM_DEVICECHANGE:
PDEV_BROADCAST_VOLUME pVol = (PDEV_BROADCAST_VOLUME)lParam;
switch(wParam)
{
case DBT_DEVICEARRIVAL:
MessageBox(NULL,_T("FOUND"), _T(""),MB_OK);
break;
case DBT_DEVICEREMOVECOMPLETE:
MessageBox(NULL,_T("REMOVED"), _T(""),MB_OK);
break;
}
break;
}
return FALSE;
}While Inserting memory card reader DBT_DEVICEARRIVAL notifies about Four Removable Drives (O,P,Q,R Drives),

But while removing memory card reader DBT_DEVICEREMOVECOMPLETE notifies about only ONE Removable Drive (O Drive).

Why DBT_DEVICEREMOVECOMPLETE does not notifies about other Three removable drives ( P,Q,R Drives). Help http://www.barakasoft.com/script/Forums/Images/smiley_confused.gif
Some Day I Will Prove MySelf :: GOLD