WTS_PROCESS_INFO_EXA structure (wtsapi32.h)

Contains extended information about a process running on a Remote Desktop Session Host (RD Session Host) server. This structure is returned by the WTSEnumerateProcessesEx function when you set the pLevel parameter to one.

Syntax

typedef struct _WTS_PROCESS_INFO_EXA {
  DWORD         SessionId;
  DWORD         ProcessId;
  LPSTR         pProcessName;
  PSID          pUserSid;
  DWORD         NumberOfThreads;
  DWORD         HandleCount;
  DWORD         PagefileUsage;
  DWORD         PeakPagefileUsage;
  DWORD         WorkingSetSize;
  DWORD         PeakWorkingSetSize;
  LARGE_INTEGER UserTime;
  LARGE_INTEGER KernelTime;
} WTS_PROCESS_INFO_EXA, *PWTS_PROCESS_INFO_EXA;

Members

SessionId

The Remote Desktop Services session identifier for the session associated with the process.

ProcessId

The process identifier that uniquely identifies the process on the RD Session Host server.

pProcessName

A pointer to a null-terminated string that contains the name of the executable file associated with the process.

pUserSid

A pointer to the user security identifiers (SIDs) in the primary access token of the process. For more information about SIDs and access tokens, see Access Control and Security Identifiers.

NumberOfThreads

The number of threads in the process.

HandleCount

The number of handles in the process.

PagefileUsage

The page file usage of the process, in bytes.

PeakPagefileUsage

The peak page file usage of the process, in bytes.

WorkingSetSize

The working set size of the process, in bytes.

PeakWorkingSetSize

The peak working set size of the process, in bytes.

UserTime

The amount of time, in milliseconds, the process has been running in user mode.

KernelTime

The amount of time, in milliseconds, the process has been running in kernel mode.

Remarks

Note

The wtsapi32.h header defines WTS_PROCESS_INFO_EX as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 7
Minimum supported server Windows Server 2008 R2
Header wtsapi32.h

See also

WTSEnumerateProcesses

WTSEnumerateProcessesEx

WTS_PROCESS_INFO