wtsapi32: Improve WTSQueryUserToken stub.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39663
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0e89c840a6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Sebastian Lackner 2019-01-23 03:22:56 +01:00 committed by Michael Stefaniuc
parent 1ddfedd051
commit e98f711639
2 changed files with 11 additions and 3 deletions

View File

@ -112,7 +112,6 @@ static void test_WTSQueryUserToken(void)
SetLastError(0xdeadbeef);
ret = WTSQueryUserToken(WTS_CURRENT_SESSION, NULL);
ok(!ret, "expected WTSQueryUserToken to fail\n");
todo_wine
ok(GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
}

View File

@ -254,8 +254,17 @@ BOOL WINAPI WTSQuerySessionInformationW(
*/
BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token)
{
FIXME("%u %p\n", session_id, token);
return FALSE;
FIXME("%u %p semi-stub!\n", session_id, token);
if (!token)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
return DuplicateHandle(GetCurrentProcess(), GetCurrentProcessToken(),
GetCurrentProcess(), token,
0, FALSE, DUPLICATE_SAME_ACCESS);
}
/************************************************************