[SERVICES]
[reactos.git] / reactos / base / system / services / database.c
index a046057..5930906 100644 (file)
@@ -30,7 +30,7 @@ static DWORD dwResumeCount = 1;
 
 
 PSERVICE
-ScmGetServiceEntryByName(LPWSTR lpServiceName)
+ScmGetServiceEntryByName(LPCWSTR lpServiceName)
 {
     PLIST_ENTRY ServiceEntry;
     PSERVICE CurrentService;
@@ -59,7 +59,7 @@ ScmGetServiceEntryByName(LPWSTR lpServiceName)
 
 
 PSERVICE
-ScmGetServiceEntryByDisplayName(LPWSTR lpDisplayName)
+ScmGetServiceEntryByDisplayName(LPCWSTR lpDisplayName)
 {
     PLIST_ENTRY ServiceEntry;
     PSERVICE CurrentService;
@@ -148,7 +148,7 @@ ScmGetServiceEntryByClientHandle(HANDLE Handle)
 
 
 DWORD
-ScmCreateNewServiceRecord(LPWSTR lpServiceName,
+ScmCreateNewServiceRecord(LPCWSTR lpServiceName,
                           PSERVICE *lpServiceRecord)
 {
     PSERVICE lpService = NULL;
@@ -191,7 +191,7 @@ ScmCreateNewServiceRecord(LPWSTR lpServiceName,
 VOID
 ScmDeleteServiceRecord(PSERVICE lpService)
 {
-    DPRINT1("Deleting Service %S\n", lpService->lpServiceName);
+    DPRINT("Deleting Service %S\n", lpService->lpServiceName);
 
     /* Delete the display name */
     if (lpService->lpDisplayName != NULL &&
@@ -215,17 +215,17 @@ ScmDeleteServiceRecord(PSERVICE lpService)
     /* Remove the Service from the List */
     RemoveEntryList(&lpService->ServiceListEntry);
 
-    DPRINT1("Deleted Service %S\n", lpService->lpServiceName);
+    DPRINT("Deleted Service %S\n", lpService->lpServiceName);
 
     /* Delete the service record */
     HeapFree(GetProcessHeap(), 0, lpService);
 
-    DPRINT1("Done\n");
+    DPRINT("Done\n");
 }
 
 
 static DWORD
-CreateServiceListEntry(LPWSTR lpServiceName,
+CreateServiceListEntry(LPCWSTR lpServiceName,
                        HKEY hServiceKey)
 {
     PSERVICE lpService = NULL;
@@ -452,7 +452,7 @@ WaitForLSA(VOID)
     HANDLE hEvent;
     DWORD dwError;
 
-    DPRINT1("WaitForLSA() called\n");
+    DPRINT("WaitForLSA() called\n");
 
     hEvent = CreateEventW(NULL,
                           TRUE,
@@ -476,13 +476,13 @@ WaitForLSA(VOID)
         }
     }
 
-    DPRINT1("Wait for LSA!\n");
+    DPRINT("Wait for LSA!\n");
     WaitForSingleObject(hEvent, INFINITE);
-    DPRINT1("LSA is available!\n");
+    DPRINT("LSA is available!\n");
 
     CloseHandle(hEvent);
 
-    DPRINT1("WaitForLSA() done\n");
+    DPRINT("WaitForLSA() done\n");
 }
 
 
@@ -727,7 +727,7 @@ ScmControlService(PSERVICE Service,
     ControlPacket->dwSize = TotalLength;
     wcscpy(&ControlPacket->szArguments[0], Service->lpServiceName);
 
-    /* Send the start command */
+    /* Send the control packet */
     WriteFile(Service->ControlPipeHandle,
               ControlPacket,
               sizeof(SCM_CONTROL_PACKET) + (TotalLength * sizeof(WCHAR)),
@@ -1054,7 +1054,7 @@ ScmStartService(PSERVICE Service, DWORD argc, LPWSTR *argv)
         {
             Group->ServicesRunning = TRUE;
         }
-        Service->Status.dwCurrentState = SERVICE_RUNNING;
+        Service->Status.dwCurrentState = SERVICE_START_PENDING;
     }
 #if 0
     else