PDA

View Full Version : winEvent return value



KenJustKen
11th August 2012, 04:15
I just realized out that my USB device needs to be updated after I wake from Hibernate so I implemented a winEvent to detect all power events and I am now able to detect these.

The question I have is what should I return, true or false. I have read some places to return true if you have used it at which point the message stops. But since these are system wide WAKEFROMSUSPEND and other power events, should I always return false so the message goes on to the other devices in the system?

Ken

d_stranz
11th August 2012, 16:36
WAKEFROMSUSPEND

I can't find any reference to such a Windows message on MSDN. Exactly what message are you referring to?

Most of the descriptions of message handlers in the Power Management section say to return TRUE if the application handles the message; see this (http://msdn.microsoft.com/en-us/library/windows/desktop/aa373247%28v=vs.85%29.aspx) for example.