开发者

Registering for USB insertion/removal notifications (Windows Service)

I am writing Windows Service which logs information on inserted or removed USB devices. RegisterDeviceNotification function returns valid handle, but SERVICE_CONTROL_DEVICEEVENT notifications still not come to service control handler function.

I used Tom Bell's "Detecting USB Device Insertion and Removal Using Windows API" and "Creating your own Windows Serv开发者_StackOverflow中文版ice" from Habrahabr.

I'm new to Services and Windows API, so could you please look at my code and tell what may be wrong? And if the code is correct, is there any pitfalls(?) connected with security restrictions or something like this?

[EDIT moved from answer]

The problem was not in code, but in incorrectly installed VirtualBox :)


The problem was not in code, but in incorrectly installed VirtualBox :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜