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>
This commit is contained in:
Sebastian Lackner 2019-01-23 03:22:56 +01:00 committed by Alexandre Julliard
parent 7c8cf96e9c
commit 0e89c840a6
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);
}
/************************************************************