Using Win32 functions in Visual FoxPro Image Gallery
Terminal Services
Code examples:
How to enumerate sessions and processes on a specified terminal server
..msdn    Add comment     W32 Constants      Translate this page
Retrieves information about the active processes on a specified terminal server.
Code examples:
How to enumerate sessions and processes on a specified terminal server
BOOL WTSEnumerateProcesses(
    HANDLE hServer,
    DWORD Reserved,
    WORD Version,
    PWTS_PROCESS_INFO* ppProcessInfo,
    DWORD* pCount
FoxPro declaration:
DECLARE INTEGER WTSEnumerateProcesses IN Wtsapi32;
    INTEGER hServer,;
    LONG Reserved,;
    LONG RqVersion,;
    LONG @ppProcessInfo,;
    LONG @PICount
[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; must be zero.

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

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

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

See also: WTSEnumerateSessions, WTSEnumerateServers.
Word Index links for the WTSEnumerateProcesses :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2006-12-29 16:04:33
Modified: 2006-12-29 16:07:39
Visited in last 7 days: 36
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
7 sec.Function: 'CreateVirtualDisk'
15 sec.Function: 'waveInAddBuffer'
22 sec.Function: 'SetPriorityClass'
31 sec.Function: 'FindResource'
40 sec.
Function group: 'Handle and Object'
49 sec.Function: 'GdipGetPropertyItem'
57 sec.Function: 'UnhookWindowsHookEx'
1.07 min.Function: 'getsockopt'
1.2 min.Function: 'GetNumberOfInterfaces'
1.35 min.
Function group: 'Kernel Transaction Manager'
Advertise here!