views:

187

answers:

0

Hey,

I have a program that needs to minimize itself when a person starts a RDC connection to the machine.

My program calls

WTSRegisterSessionNotification

when it starts up and I also added a

WM_WTSSESSION_CHANGE

case inside my main WindowsProc function. For some reason in Windows 7 this logic intermittently works, and in Windows XP and Vista it just seems flat out broken. Is there anything that could be stopping my application window from receiving the WM_WTSSESSION events?

Thanks, Krishna