Click or drag to resize
Xcalibur Systems LLC Logo

ProcessHelperProcessIdToSessionId Method

Retrieves the Remote Desktop Services session associated with a specified process.

ProcessIdToSessionId function


Namespace: Xcalibur.NativeMethods.V2.Processes
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("kernel32.dll")]
public static bool ProcessIdToSessionId(
	uint processId,
	out uint sessionId
)

Parameters

processId  UInt32
Specifies a process identifier. Use the function to retrieve the process identifier for the current process.
sessionId  UInt32
Pointer to a variable that receives the identifier of the Remote Desktop Services session under which the specified process is running. To retrieve the identifier of the session currently attached to the console, use the function.

Return Value

Boolean
If the function fails, the return value is zero. To get extended error information, call .
See Also