参考MSDN例子:Detecting Media Insertion or Removal 响应WM_DEVICECHANGE 消息: BOOL OnDeviceChange( UINT nEventType, DWORD dwData ) { PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)dwData; // struct transform PDEV_BROADCAST_VOLUME lpdbv = (PDEV_BROADCAST_VOLUME)lpdb; switch (nEventType) { case DBT_DEVNODES_CHANGED:  ...
[ 查看全文 ]