kernel32: Use session id stored in PEB in ProcessIdToSessionId.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2015-10-08 14:20:05 +02:00 committed by Alexandre Julliard
parent 19e16319b8
commit 888d1c67bb
1 changed files with 4 additions and 4 deletions

View File

@ -3742,10 +3742,10 @@ BOOL WINAPI K32GetProcessMemoryInfo(HANDLE process,
*/
BOOL WINAPI ProcessIdToSessionId( DWORD procid, DWORD *sessionid_ptr )
{
/* According to MSDN, if the calling process is not in a terminal
* services environment, then the sessionid returned is zero.
*/
*sessionid_ptr = 0;
if (procid != GetCurrentProcessId())
FIXME("Unsupported for other processes.\n");
*sessionid_ptr = NtCurrentTeb()->Peb->SessionId;
return TRUE;
}