Get notification when a new drive is connected via USB or other means (C#)

前端 未结 4 720
余生分开走
余生分开走 2020-12-20 17:36

I need to detect when a new drive is plugged into a Windows system through a USB port, firewire port, etc. I am aware of the WM_DEVICECHANGE message, but this requires a win

4条回答
  •  被撕碎了的回忆
    2020-12-20 18:31

    You may create a hidden window or run a service as it should work with a window handle or a service status handle.

提交回复
热议问题