DECLAREINTEGER WTSRegisterSessionNotification IN Wtsapi32;
[in] Handle of the window to receive session change notifications.
[in] Specifies which session notifications are to be received: NOTIFY_FOR_THIS_SESSION, NOTIFY_FOR_ALL_SESSIONS.
If the function succeeds, the return value is TRUE.
Session change notifications are sent in the form of a WM_WTSSESSION_CHANGE message. When a window no longer requires these notifications, it must call WTSUnRegisterSessionNotification before being destroyed.