Using Win32 functions in Visual FoxPro Image Gallery
Terminal Services
..msdn
WTSCloseServer
WTSEnumerateProcesses
WTSEnumerateServers
WTSEnumerateSessions
WTSFreeMemory
WTSOpenServer
WTSQuerySessionInformation
WTSRegisterSessionNotification
WTSSendMessage
WTSUnRegisterSessionNotification
Code examples:
How to enumerate sessions and processes on a specified terminal server
WTSEnumerateSessions
..msdn    Add comment     W32 Constants      Translate this page
Retrieves a list of sessions on a specified terminal server.
Code examples:
How to enumerate sessions and processes on a specified terminal server
Declaration:
BOOL WTSEnumerateSessions(
    HANDLE hServer,
    DWORD Reserved,
    DWORD Version,
    PWTS_SESSION_INFO* ppSessionInfo,
    DWORD* pCount
);
FoxPro declaration:
DECLARE INTEGER WTSEnumerateSessions IN Wtsapi32;
    INTEGER hServer,;
    LONG Reserved,;
    LONG RqVersion,;
    LONG @ppSessionInfo,;
    LONG @SICount

Parameters:
hServer
[in] Handle to a terminal server. Specify a handle opened by the WTSOpenServer function, or specify WTS_CURRENT_SERVER_HANDLE to indicate the terminal server on which your application is running.

Reserved
Reserved; must be zero.

Version
[in] Specifies the version of the enumeration request. Must be 1.

ppSessionInfo
[out] Pointer to a variable that receives a pointer to an array of WTS_SESSION_INFO structures.

pCount
[out] Pointer to the variable that receives the number of WTS_SESSION_INFO structures returned in the ppSessionInfo buffer.
Return value:
If the function succeeds, the return value is a nonzero value.
My comment:
To free ppSessionInfo, call the WTSFreeMemory function.

See also: WTSEnumerateProcesses, WTSEnumerateServers.
Word Index links for the WTSEnumerateSessions :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-12-29 16:00:12
Modified: 2006-12-29 16:04:20
Visited in last 7 days: 22
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 (54.163.61.66)
14 sec.Function: 'StartPage'
29 sec.Function: 'SHGetSpecialFolderLocation'
43 sec.Function: 'GdipReleaseDC'
58 sec.Function: 'CeGetLastError'
1.2 min.Function: 'StrToInt'
1.48 min.Function: 'FindWindow'
Function group: 'Window'
1.73 min.Function: 'CreateService'
2 min.Function: 'IpReleaseAddress'
2.27 min.Function: 'GdipCreateSolidFill'
2.53 min.Function: 'WSACloseEvent'
Google
Advertise here!