The name 'WM_DEVICECHANGE' does not exist in the current context

后端 未结 1 1980
北海茫月
北海茫月 2021-01-21 01:20

I am trying to detect a usb arrival event . I tried to override wndproc() for getting my messages. But I am facing an error by windows messages.

The error

相关标签:
1条回答
  • 2021-01-21 02:18

    You have to declare and define the values of the constants:

    private const int DBT_DEVICEARRIVAL = 0x8000;
    private const int WM_DEVICECHANGE = 0x0219;
    
    0 讨论(0)
提交回复
热议问题