Group: Terminal Services - Library: wtsapi32
BOOL WTSRegisterSessionNotification(
HWND hWnd,
DWORD dwFlags
);
DECLARE INTEGER WTSRegisterSessionNotification IN Wtsapi32;
INTEGER hWindow,;
LONG dwFlags hWnd [in] Handle of the window to receive session change notifications.
dwFlags [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.
See also: LockWorkStation.
Home