WINCE 检测SD卡

LRESULT CXXXXXDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)

if ( message == WM_DEVICECHANGE )

{  

switch (wParam)

{

case DBT_DEVICEARRIVAL: //U盘插进来

{

DEV_BROADCAST_HDR* dhr = (DEV_BROADCAST_HDR *)lParam;

PDEV_BROADCAST_PORT lpdbp = (PDEV_BROADCAST_PORT)dhr;

 

if( lpdbp->dbcp_devicetype == DBT_DEVTYP_PORT )

{

if ( wcsicmp(lpdbp->dbcp_name, TCH_PATH3) == 0 ) //盘符,自己断点看看,我们是CF卡

{ //判断到升级u盘

}

}

break;

}

case DBT_DEVICEREMOVECOMPLETE:

break;

default:

break;

}

}


你可能感兴趣的:(WINCE 检测SD卡)