[USERSRV]: Stubplement all the APIs needed for Windows kernel32.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 30 Aug 2013 11:33:25 +0000 (11:33 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 30 Aug 2013 11:33:25 +0000 (11:33 +0000)
svn path=/trunk/; revision=59900

reactos/include/reactos/subsys/win/winmsg.h
reactos/win32ss/user/winsrv/usersrv/api.h
reactos/win32ss/user/winsrv/usersrv/init.c
reactos/win32ss/user/winsrv/usersrv/shutdown.c

index b238d1c..44593bd 100644 (file)
 typedef enum _USERSRV_API_NUMBER
 {
     UserpExitWindowsEx = USERSRV_FIRST_API_NUMBER,
-    // UserpEndTask,
-    // UserpLogon,
+    UserpEndTask,
+    UserpLogon,
     UserpRegisterServicesProcess, // Not present in Win7
-    // UserpActivateDebugger,
-    // UserpGetThreadConsoleDesktop, // Not present in Win7
-    // UserpDeviceEvent,
+    UserpActivateDebugger,
+    UserpGetThreadConsoleDesktop, // Not present in Win7
+    UserpDeviceEvent,
     UserpRegisterLogonProcess,    // Not present in Win7
-    // UserpCreateSystemThreads,
-    // UserpRecordShutdownReason,
+    UserpCreateSystemThreads,
+    UserpRecordShutdownReason,
     // UserpCancelShutdown,              // Added in Vista
     // UserpConsoleHandleOperation,      // Added in Win7
     // UserpGetSetShutdownBlockReason,   // Added in Vista
index 478adf0..34e9c45 100644 (file)
 
 /* init.c */
 BOOL WINAPI _UserSoundSentry(VOID);
+CSR_API(SrvCreateSystemThreads);
+CSR_API(SrvActivateDebugger);
+CSR_API(SrvGetThreadConsoleDesktop);
+CSR_API(SrvDeviceEvent);
 
 /* harderror.c */
 VOID WINAPI UserServerHardError(IN PCSR_THREAD ThreadData,
@@ -21,5 +25,8 @@ CSR_API(SrvRegisterLogonProcess);
 
 /* shutdown.c */
 CSR_API(SrvExitWindowsEx);
+CSR_API(SrvEndTask);
+CSR_API(SrvLogon);
+CSR_API(SrvRecordShutdownReason);
 
 /* EOF */
index 0cf5288..7749d74 100644 (file)
@@ -26,15 +26,15 @@ HANDLE UserServerHeap = NULL;   // Our own heap.
 PCSR_API_ROUTINE UserServerApiDispatchTable[UserpMaxApiNumber - USERSRV_FIRST_API_NUMBER] =
 {
     SrvExitWindowsEx,
-    // SrvEndTask,
-    // SrvLogon,
+    SrvEndTask,
+    SrvLogon,
     SrvRegisterServicesProcess, // Not present in Win7
-    // SrvActivateDebugger,
-    // SrvGetThreadConsoleDesktop, // Not present in Win7
-    // SrvDeviceEvent,
+    SrvActivateDebugger,
+    SrvGetThreadConsoleDesktop, // Not present in Win7
+    SrvDeviceEvent,
     SrvRegisterLogonProcess,    // Not present in Win7
-    // SrvCreateSystemThreads,
-    // SrvRecordShutdownReason,
+    SrvCreateSystemThreads,
+    SrvRecordShutdownReason,
     // SrvCancelShutdown,              // Added in Vista
     // SrvConsoleHandleOperation,      // Added in Win7
     // SrvGetSetShutdownBlockReason,   // Added in Vista
@@ -43,15 +43,15 @@ PCSR_API_ROUTINE UserServerApiDispatchTable[UserpMaxApiNumber - USERSRV_FIRST_AP
 BOOLEAN UserServerApiServerValidTable[UserpMaxApiNumber - USERSRV_FIRST_API_NUMBER] =
 {
     FALSE,   // SrvExitWindowsEx
-    // FALSE,   // SrvEndTask
-    // FALSE,   // SrvLogon
+    FALSE,   // SrvEndTask
+    FALSE,   // SrvLogon
     FALSE,   // SrvRegisterServicesProcess
-    // FALSE,   // SrvActivateDebugger
-    // TRUE,    // SrvGetThreadConsoleDesktop
-    // FALSE,   // SrvDeviceEvent
+    FALSE,   // SrvActivateDebugger
+    TRUE,    // SrvGetThreadConsoleDesktop
+    FALSE,   // SrvDeviceEvent
     FALSE,   // SrvRegisterLogonProcess
-    // FALSE,   // SrvCreateSystemThreads
-    // FALSE,   // SrvRecordShutdownReason
+    FALSE,   // SrvCreateSystemThreads
+    FALSE,   // SrvRecordShutdownReason
     // FALSE,   // SrvCancelShutdown
     // FALSE,   // SrvConsoleHandleOperation
     // FALSE,   // SrvGetSetShutdownBlockReason
@@ -60,15 +60,15 @@ BOOLEAN UserServerApiServerValidTable[UserpMaxApiNumber - USERSRV_FIRST_API_NUMB
 PCHAR UserServerApiNameTable[UserpMaxApiNumber - USERSRV_FIRST_API_NUMBER] =
 {
     "SrvExitWindowsEx",
-    // "SrvEndTask",
-    // "SrvLogon",
+    "SrvEndTask",
+    "SrvLogon",
     "SrvRegisterServicesProcess",
-    // "SrvActivateDebugger",
-    // "SrvGetThreadConsoleDesktop",
-    // "SrvDeviceEvent",
+    "SrvActivateDebugger",
+    "SrvGetThreadConsoleDesktop",
+    "SrvDeviceEvent",
     "SrvRegisterLogonProcess",
-    // "SrvCreateSystemThreads",
-    // "SrvRecordShutdownReason",
+    "SrvCreateSystemThreads",
+    "SrvRecordShutdownReason",
     // "SrvCancelShutdown",
     // "SrvConsoleHandleOperation",
     // "SrvGetSetShutdownBlockReason",
@@ -236,8 +236,8 @@ PrivateCsrssManualGuiCheck(LONG Check)
     NtUserCallOneParam(Check, ONEPARAM_ROUTINE_CSRSS_GUICHECK);
 }
 
-DWORD
-WINAPI
+ULONG
+NTAPI
 CreateSystemThreads(PVOID pParam)
 {
     NtUserCallOneParam((DWORD)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS);
@@ -245,6 +245,30 @@ CreateSystemThreads(PVOID pParam)
     return 0;
 }
 
+CSR_API(SrvCreateSystemThreads)
+{
+    DPRINT1("%s not yet implemented\n", __FUNCTION__);
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+CSR_API(SrvActivateDebugger)
+{
+    DPRINT1("%s not yet implemented\n", __FUNCTION__);
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+CSR_API(SrvGetThreadConsoleDesktop)
+{
+    DPRINT1("%s not yet implemented\n", __FUNCTION__);
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+CSR_API(SrvDeviceEvent)
+{
+    DPRINT1("%s not yet implemented\n", __FUNCTION__);
+    return STATUS_NOT_IMPLEMENTED;
+}
+
 CSR_SERVER_DLL_INIT(UserServerDllInitialization)
 {
 /*** From win32csr... ***/
@@ -280,7 +304,10 @@ CSR_SERVER_DLL_INIT(UserServerDllInitialization)
     /* Start the Raw Input Thread and the Desktop Thread */
     for (i = 0; i < 2; ++i)
     {
-        Status = RtlCreateUserThread(NtCurrentProcess(), NULL, TRUE, 0, 0, 0, (PTHREAD_START_ROUTINE)CreateSystemThreads, (PVOID)i, &ServerThread, &ClientId);
+        Status = RtlCreateUserThread(NtCurrentProcess(),
+                                     NULL, TRUE, 0, 0, 0,
+                                     CreateSystemThreads,
+                                     (PVOID)i, &ServerThread, &ClientId);
         if (NT_SUCCESS(Status))
         {
             NtResumeThread(ServerThread, NULL);
index 12f3a12..76b0f05 100644 (file)
@@ -931,4 +931,22 @@ CSR_API(SrvExitWindowsEx)
     }
 }
 
+CSR_API(SrvEndTask)
+{
+    DPRINT1("%s not yet implemented\n", __FUNCTION__);
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+CSR_API(SrvLogon)
+{
+    DPRINT1("%s not yet implemented\n", __FUNCTION__);
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+CSR_API(SrvRecordShutdownReason)
+{
+    DPRINT1("%s not yet implemented\n", __FUNCTION__);
+    return STATUS_NOT_IMPLEMENTED;
+}
+
 /* EOF */