Commit 0e89c840 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

wtsapi32: Improve WTSQueryUserToken stub.

parent 7c8cf96e
...@@ -112,7 +112,6 @@ static void test_WTSQueryUserToken(void) ...@@ -112,7 +112,6 @@ static void test_WTSQueryUserToken(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = WTSQueryUserToken(WTS_CURRENT_SESSION, NULL); ret = WTSQueryUserToken(WTS_CURRENT_SESSION, NULL);
ok(!ret, "expected WTSQueryUserToken to fail\n"); ok(!ret, "expected WTSQueryUserToken to fail\n");
todo_wine
ok(GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); ok(GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError());
} }
......
...@@ -254,8 +254,17 @@ BOOL WINAPI WTSQuerySessionInformationW( ...@@ -254,8 +254,17 @@ BOOL WINAPI WTSQuerySessionInformationW(
*/ */
BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token) BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token)
{ {
FIXME("%u %p\n", session_id, token); FIXME("%u %p semi-stub!\n", session_id, token);
return FALSE;
if (!token)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
return DuplicateHandle(GetCurrentProcess(), GetCurrentProcessToken(),
GetCurrentProcess(), token,
0, FALSE, DUPLICATE_SAME_ACCESS);
} }
/************************************************************ /************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment