It has a THROW Win32Exception.
The problem: it is called by function OnKey that has no TRY CATCH block. This cause the application to crash when the exception is thrown (exception is not handled by the application).
My application crashed every single time the application was left running and the computer was opened from Sleep mode.
Windows 8.1 (PRO) 64 Bits