views:

34

answers:

0

Hello all, I'm experiencing a weird problem with a little app I wrote to detect Windows shutdown.

Using Remote Desktop to connect to a Windows 2003 server, sometimes upon login I get the WM_QUERYENDSESSION from the OS with lParam = 0, which my app interprets as a shutdown request (as stated in http://msdn.microsoft.com/en-us/library/aa376890%28VS.85%29.aspx) and, as a consequence, performs its task. Problem is, I am actually logging in, not shutting down or rebooting the system.

I think it has probably to do with session management under Windows 2003 Server, as the same tool performs quite nicely on Windows XP.

I tried limiting remote access to a maximum of 1 remote session per user, but it didn't change the behaviour.

Any hint on this?