From 15e3e7fd28ef298d370800271d7e3fa53c8bc783 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 5 Mar 2016 11:04:47 +0000 Subject: [PATCH] [WTSAPI32] Sync with Wine Staging 1.9.4. CORE-10912 svn path=/trunk/; revision=70951 --- reactos/dll/win32/wtsapi32/wtsapi32.c | 14 +++++++++++++- reactos/media/doc/README.WINE | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/wtsapi32/wtsapi32.c b/reactos/dll/win32/wtsapi32/wtsapi32.c index 042760f0777..a7f4c873d9c 100644 --- a/reactos/dll/win32/wtsapi32/wtsapi32.c +++ b/reactos/dll/win32/wtsapi32/wtsapi32.c @@ -28,6 +28,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(wtsapi); +/* FIXME: Inspect */ +#define GetCurrentProcessToken() ((HANDLE)~(ULONG_PTR)3) + /************************************************************ * WTSCloseServer (WTSAPI32.@) @@ -311,7 +314,16 @@ BOOL WINAPI WTSQuerySessionInformationW( BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token) { FIXME("%u %p\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); } /************************************************************ diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index a7f299c3244..dd0a4ab6ddc 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -216,7 +216,7 @@ reactos/dll/win32/wmi # Synced to WineStaging-1.7.55 reactos/dll/win32/wmiutils # Synced to WineStaging-1.7.55 reactos/dll/win32/wmvcore # Synced to WineStaging-1.7.55 reactos/dll/win32/wshom.ocx # Synced to WineStaging-1.7.55 -reactos/dll/win32/wtsapi32 # Synced to WineStaging-1.7.55 +reactos/dll/win32/wtsapi32 # Synced to WineStaging-1.9.4 reactos/dll/win32/wuapi # Synced to WineStaging-1.7.55 reactos/dll/win32/xinput1_1 # Synced to WineStaging-1.7.55 reactos/dll/win32/xinput1_2 # Synced to WineStaging-1.7.55