UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:processthreadsapi.ProcessIdToSessionId |
ProcessIdToSessionId function (processthreadsapi.h) |
Retrieves the Remote Desktop Services session associated with a specified process. |
|
termserv\processidtosessionid.htm |
processthreadsapi |
99a3f047-705c-40bc-8cc2-055257a4f2b3 |
12/05/2018 |
ProcessIdToSessionId, ProcessIdToSessionId function [Remote Desktop Services], _win32_processidtosessionid, processthreadsapi/ProcessIdToSessionId, termserv.processidtosessionid |
processthreadsapi.h |
Windows.h |
Windows |
Windows Vista |
Windows Server 2008 |
Kernel32.lib |
Kernel32.dll |
Windows |
19H1 |
|
|
|
|
|
|
Retrieves the Remote Desktop Services session associated with a specified process.
Specifies a process identifier. Use the GetCurrentProcessId function to retrieve the process identifier for the current process.
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 WTSGetActiveConsoleSessionId function.
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Callers must hold the PROCESS_QUERY_INFORMATION access right for the specified process. For more information, see Process Security and Access Rights.