So basically I have a plugin dll that is loaded by a GUI-Application. In this dll I need to detect when Windows enters the Hibernate state. I cannot modify the GUI-App. GetMessage only works if the calling thread is the same thread as the UI-Thread, which it is not. Any ideas?
Share
You could create a hidden window in a seperate thread from your DLL code. And process messages as shown below.
You could use this Window class for that.
Also make sure to include an exit condition.