if(message->message == WM_DEVICECHANGE)
{
/*if (message->wParam == DBT_DEVICEARRIVAL || message->wParam == DBT_DEVICEREMOVECOMPLETE)
{
PDEV_BROADCAST_HDR pHeader = (PDEV_BROADCAST_HDR)message->lParam;
if (pHeader->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
{
hotplug_onSystemDeviceChanged();
}
}*/
//DBT_DEVNODES_CHANGED:: The system broadcasts the DBT_DEVNODES_CHANGED device event when a device has been added to or removed from the system.
//Applications that maintain lists of devices in the system should refresh their lists.
if (message->wParam == DBT_DEVNODES_CHANGED && message->lParam == 0)
{
hotplug_onSystemDeviceChanged();
}
}

相关文章:

  • 2022-12-23
  • 2021-07-09
  • 2021-08-19
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-09-01
  • 2021-11-20
  • 2022-01-30
  • 2022-12-23
相关资源
相似解决方案