title: subscribe to windows system events native c++
body: <p>I want  my c++ app to listen to windows system event like, logon, logoff, lock...
  similar to: <a href="http://www.dotnetspider.com/resources/30389-To-detect-when-system-gets.aspx" rel="nofollow">http://www.dotnetspider.com/resources/30389-To-detect-when-system-gets.aspx</a> that is written in C#.<br>
  I found <a href="http://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.aspx#Y0m" rel="nofollow">http://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.aspx#Y0m</a>, but its a CLR code. Also, I see that SubscribeToSystemEvent function is in visual C++.</p>
  
  <p>Does anyone know which methods to use in native c++?</p>
  
  <p>please advise, </p>
  
  <p>Liron</p>