Using Win32 functions in Visual FoxPro Image Gallery
Terminal Services
..msdn
WTSCloseServer
WTSEnumerateProcesses
WTSEnumerateServers
WTSEnumerateSessions
WTSFreeMemory
WTSOpenServer
WTSQuerySessionInformation
WTSRegisterSessionNotification
WTSSendMessage
WTSUnRegisterSessionNotification
Code examples:
Locking the workstation
WTSRegisterSessionNotification
..msdn    Add comment     W32 Constants      Translate this page
Registers the specified window to receive session change notifications.
Code examples:
Locking the workstation
Declaration:
BOOL WTSRegisterSessionNotification(
  HWND hWnd,
  DWORD dwFlags
);

FoxPro declaration:
DECLARE INTEGER WTSRegisterSessionNotification IN Wtsapi32;
    INTEGER hWindow,;
    LONG dwFlags
Parameters:
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.
Return value:
If the function succeeds, the return value is TRUE.
My comment:
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.
Word Index links for the WTSRegisterSessionNotification :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-03-30 13:28:24
Modified: 2006-03-30 13:31:27
Visited in last 7 days: 17
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.20.86.177)
4 sec.Function: 'ReadFile'
8 sec.Function: 'InternetCheckConnection'
12 sec.Function: 'CloseServiceHandle'
16 sec.Function: 'CreateJobObject'
21 sec.Function: 'InternetGoOnline'
25 sec.Function: 'GetKBCodePage'
30 sec.Function: 'GetForegroundWindow'
34 sec.Function: 'FindNextFile'
39 sec.Function: 'SCardReleaseContext'
43 sec.Function: 'CeRegCloseKey'
Google
Advertise here!