[WTSAPI32] Sync with Wine Staging 1.9.4. CORE-10912
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 5 Mar 2016 11:04:47 +0000 (11:04 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 5 Mar 2016 11:04:47 +0000 (11:04 +0000)
svn path=/trunk/; revision=70951

reactos/dll/win32/wtsapi32/wtsapi32.c
reactos/media/doc/README.WINE

index 042760f..a7f4c87 100644 (file)
@@ -28,6 +28,9 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(wtsapi);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(wtsapi);
 
+/* FIXME: Inspect */
+#define GetCurrentProcessToken() ((HANDLE)~(ULONG_PTR)3)
+
 
 /************************************************************
  *                WTSCloseServer  (WTSAPI32.@)
 
 /************************************************************
  *                WTSCloseServer  (WTSAPI32.@)
@@ -311,7 +314,16 @@ BOOL WINAPI WTSQuerySessionInformationW(
 BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token)
 {
     FIXME("%u %p\n", session_id, token);
 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);
 }
 
 /************************************************************
 }
 
 /************************************************************
index a7f299c..dd0a4ab 100644 (file)
@@ -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/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
 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