Create a dummy window that does nothing but wait for WM_DEVICECHANGE
and register that window using RegisterDeviceNotification
. WMI is an overkill here, IMHO.
More Related Contents:
- Should I avoid ‘async void’ event handlers?
- How do I await events in C#?
- boost asio async_write : how to not interleaving async_write calls?
- Why is the destructor of a future returned from `std::async` blocking?
- What is the proper way of doing event handling in C++?
- Why should I use std::async?
- Intercept windows open file
- Can I use std::async without waiting for the future limitation?
- Passing arguments to std::async by reference fails
- Some clarification needed about synchronous versus asynchronous asio operations
- Unable to read frames from VideoCapture from secondary webcam with OpenCV
- When must you pass io_context to boost::asio::spawn? (C++)
- boost::asio + std::future – Access violation after closing socket
- std::async won’t spawn a new thread when return value is not stored
- How to extract a multiline text segment between two delimiters under a certain heading from a text file using C++ [closed]
- Will std::string always be null-terminated in C++11?
- Using newly declared variable in initialization (int x = x+1)?
- Does std::vector *have* to move objects when growing capacity? Or, can allocators “reallocate”?
- How to ensure an event is only subscribed to once
- Operator overloading outside class [duplicate]
- Why is f(i = -1, i = -1) undefined behavior?
- Do c++ templates make programs slow?
- Getting a vector into a function that expects a vector
- Understanding (simple?) C++ Partial Template Specialization
- Class inherited from class without default constructor
- In C/C++, is char* arrayName[][] a pointer to a pointer to a pointer OR a pointer to a pointer?
- Can undefined behavior erase the hard drive?
- Eclipse CDT: Unresolved inclusion of stl header
- Why is the new operator allowed to return *void to every pointer-type?
- Why is the != operator not allowed with OpenMP?