[SERVICES]

Disable a number of debug messages in the service manager.

svn path=/trunk/; revision=45637
This commit is contained in:
Eric Kohl 2010-02-20 20:52:14 +00:00
parent c6d4485959
commit 697374c8e1
2 changed files with 124 additions and 124 deletions

View file

@ -191,7 +191,7 @@ ScmCreateNewServiceRecord(LPCWSTR 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,12 +215,12 @@ 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");
}

View file

@ -118,7 +118,7 @@ ScmStartRpcServer(VOID)
NULL);
if (Status != RPC_S_OK)
{
DPRINT1("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
DPRINT("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
return;
}
@ -127,14 +127,14 @@ ScmStartRpcServer(VOID)
NULL);
if (Status != RPC_S_OK)
{
DPRINT1("RpcServerRegisterIf() failed (Status %lx)\n", Status);
DPRINT("RpcServerRegisterIf() failed (Status %lx)\n", Status);
return;
}
Status = RpcServerListen(1, 20, TRUE);
if (Status != RPC_S_OK)
{
DPRINT1("RpcServerListen() failed (Status %lx)\n", Status);
DPRINT("RpcServerListen() failed (Status %lx)\n", Status);
return;
}
@ -153,12 +153,12 @@ ScmCreateManagerHandle(LPWSTR lpDatabaseName,
if (_wcsicmp(lpDatabaseName,SERVICES_FAILED_DATABASEW)==0)
{
DPRINT1("Database %S, does not exist\n",lpDatabaseName);
DPRINT("Database %S, does not exist\n",lpDatabaseName);
return ERROR_DATABASE_DOES_NOT_EXIST;
}
else if (_wcsicmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0)
{
DPRINT1("Invalid Database name %S.\n",lpDatabaseName);
DPRINT("Invalid Database name %S.\n",lpDatabaseName);
return ERROR_INVALID_NAME;
}
@ -284,7 +284,7 @@ Int_EnumDependentServicesW(HKEY hServicesKey,
NULL);
if (dwError != ERROR_SUCCESS)
{
DPRINT1("ERROR! Unable to get number of services keys.\n");
DPRINT("ERROR! Unable to get number of services keys.\n");
return dwError;
}
@ -341,7 +341,7 @@ Int_EnumDependentServicesW(HKEY hServicesKey,
if (!lpCurrentService)
{
/* This should never happen! */
DPRINT1("This should not happen at this point, report to Developer\n");
DPRINT("This should not happen at this point, report to Developer\n");
return ERROR_NOT_FOUND;
}
@ -473,7 +473,7 @@ DWORD RCloseServiceHandle(
&hServicesKey);
if (dwError != ERROR_SUCCESS)
{
DPRINT1("Failed to open services key\n");
DPRINT("Failed to open services key\n");
return dwError;
}
@ -488,7 +488,7 @@ DWORD RCloseServiceHandle(
/* if pcbBytesNeeded returned a value then there are services running that are dependent on this service*/
if (pcbBytesNeeded)
{
DPRINT1("Deletion failed due to running dependencies.\n");
DPRINT("Deletion failed due to running dependencies.\n");
RegCloseKey(hServicesKey);
return ERROR_SUCCESS;
}
@ -504,7 +504,7 @@ DWORD RCloseServiceHandle(
if (dwError != ERROR_SUCCESS)
{
DPRINT1("Failed to Delete the Service Registry key\n");
DPRINT("Failed to Delete the Service Registry key\n");
return dwError;
}
@ -517,7 +517,7 @@ DWORD RCloseServiceHandle(
return ERROR_SUCCESS;
}
DPRINT1("Invalid handle tag (Tag %lx)\n", hManager->Handle.Tag);
DPRINT("Invalid handle tag (Tag %lx)\n", hManager->Handle.Tag);
return ERROR_INVALID_HANDLE;
}
@ -546,7 +546,7 @@ DWORD RControlService(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
@ -554,7 +554,7 @@ DWORD RControlService(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -603,7 +603,7 @@ DWORD RControlService(
&hServicesKey);
if (dwError != ERROR_SUCCESS)
{
DPRINT1("Failed to open services key\n");
DPRINT("Failed to open services key\n");
return dwError;
}
@ -685,7 +685,7 @@ DWORD RDeleteService(
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -693,7 +693,7 @@ DWORD RDeleteService(
if (lpService->bDeleted)
{
DPRINT1("The service has already been marked for delete!\n");
DPRINT("The service has already been marked for delete!\n");
return ERROR_SERVICE_MARKED_FOR_DELETE;
}
@ -761,7 +761,7 @@ DWORD RQueryServiceObjectSecurity(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
@ -776,14 +776,14 @@ DWORD RQueryServiceObjectSecurity(
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
DesiredAccess))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -838,12 +838,12 @@ DWORD RSetServiceObjectSecurity(
/* NTSTATUS Status; */
DWORD dwError;
DPRINT1("RSetServiceObjectSecurity() called\n");
DPRINT("RSetServiceObjectSecurity() called\n");
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
@ -875,14 +875,14 @@ DWORD RSetServiceObjectSecurity(
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
DesiredAccess))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -960,21 +960,21 @@ DWORD RQueryServiceStatus(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_QUERY_STATUS))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -1026,21 +1026,21 @@ DWORD RSetServiceStatus(
if (hServiceStatus == 0)
{
DPRINT1("hServiceStatus == NULL!\n");
DPRINT("hServiceStatus == NULL!\n");
return ERROR_INVALID_HANDLE;
}
lpService = ScmGetServiceEntryByClientHandle((HANDLE)hServiceStatus);
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
/* Check current state */
if (!ScmIsValidServiceState(lpServiceStatus->dwCurrentState))
{
DPRINT1("Invalid service state!\n");
DPRINT("Invalid service state!\n");
return ERROR_INVALID_DATA;
}
@ -1048,14 +1048,14 @@ DWORD RSetServiceStatus(
if (!(lpServiceStatus->dwServiceType & SERVICE_WIN32) &&
(lpServiceStatus->dwServiceType & SERVICE_DRIVER))
{
DPRINT1("Invalid service type!\n");
DPRINT("Invalid service type!\n");
return ERROR_INVALID_DATA;
}
/* Check accepted controls */
if (lpServiceStatus->dwControlsAccepted & ~0xFF)
{
DPRINT1("Invalid controls accepted!\n");
DPRINT("Invalid controls accepted!\n");
return ERROR_INVALID_DATA;
}
@ -1139,21 +1139,21 @@ DWORD RChangeServiceConfigW(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_CHANGE_CONFIG))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -1162,7 +1162,7 @@ DWORD RChangeServiceConfigW(
if (lpService->bDeleted)
{
/* FIXME: Unlock database */
DPRINT1("The service has already been marked for delete!\n");
DPRINT("The service has already been marked for delete!\n");
return ERROR_SERVICE_MARKED_FOR_DELETE;
}
@ -1365,14 +1365,14 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
*RelativeName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR) + sizeof(WCHAR));
if (*RelativeName == NULL)
{
DPRINT1("Error allocating memory for boot driver name!\n");
DPRINT("Error allocating memory for boot driver name!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
/* Copy it */
wcscpy(*RelativeName, CanonName);
DPRINT1("Bootdriver name %S\n", *RelativeName);
DPRINT("Bootdriver name %S\n", *RelativeName);
return ERROR_SUCCESS;
}
@ -1385,7 +1385,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
if (*RelativeName == NULL)
{
DPRINT1("Error allocating memory for boot driver name!\n");
DPRINT("Error allocating memory for boot driver name!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1393,7 +1393,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
wcscpy(*RelativeName, L"\\SystemRoot\\");
wcscat(*RelativeName, CanonName + 13);
DPRINT1("Bootdriver name %S\n", *RelativeName);
DPRINT("Bootdriver name %S\n", *RelativeName);
return ERROR_SUCCESS;
}
@ -1402,7 +1402,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
if (BufferSize <= 1)
{
DPRINT1("Error during a call to ExpandEnvironmentStringsW()\n");
DPRINT("Error during a call to ExpandEnvironmentStringsW()\n");
return ERROR_INVALID_ENVIRONMENT;
}
@ -1410,7 +1410,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
Expanded = LocalAlloc(LMEM_ZEROINIT, BufferSize * sizeof(WCHAR) + sizeof(WCHAR));
if (!Expanded)
{
DPRINT1("Error allocating memory for boot driver name!\n");
DPRINT("Error allocating memory for boot driver name!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1418,7 +1418,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
if (ExpandEnvironmentStringsW(L"%SystemRoot%\\", Expanded, BufferSize) >
BufferSize)
{
DPRINT1("Error during a call to ExpandEnvironmentStringsW()\n");
DPRINT("Error during a call to ExpandEnvironmentStringsW()\n");
LocalFree(Expanded);
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1426,7 +1426,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
/* Convert to NY-style path */
if (!RtlDosPathNameToNtPathName_U(Expanded, &NtPathName, NULL, NULL))
{
DPRINT1("Error during a call to RtlDosPathNameToNtPathName_U()\n");
DPRINT("Error during a call to RtlDosPathNameToNtPathName_U()\n");
return ERROR_INVALID_ENVIRONMENT;
}
@ -1439,7 +1439,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
Expanded = LocalAlloc(LMEM_ZEROINIT, NtPathName.Length + sizeof(WCHAR));
if (!Expanded)
{
DPRINT1("Error allocating memory for boot driver name!\n");
DPRINT("Error allocating memory for boot driver name!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1455,7 +1455,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
(ServiceNameLen - ExpandedLen) * sizeof(WCHAR) + 13*sizeof(WCHAR));
if (*RelativeName == NULL)
{
DPRINT1("Error allocating memory for boot driver name!\n");
DPRINT("Error allocating memory for boot driver name!\n");
LocalFree(Expanded);
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1491,7 +1491,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
/* Check if required buffer size is sane */
if (BufferSize > 0xFFFD)
{
DPRINT1("Too large buffer required\n");
DPRINT("Too large buffer required\n");
*RelativeName = 0;
if (SymbolicLinkHandle) NtClose(SymbolicLinkHandle);
@ -1503,7 +1503,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
LinkTarget.Buffer = LocalAlloc(LMEM_ZEROINIT, BufferSize + sizeof(WCHAR));
if (!LinkTarget.Buffer)
{
DPRINT1("Unable to alloc buffer\n");
DPRINT("Unable to alloc buffer\n");
if (SymbolicLinkHandle) NtClose(SymbolicLinkHandle);
LocalFree(Expanded);
return ERROR_NOT_ENOUGH_MEMORY;
@ -1527,7 +1527,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
if (*RelativeName == NULL)
{
DPRINT1("Unable to alloc buffer\n");
DPRINT("Unable to alloc buffer\n");
if (SymbolicLinkHandle) NtClose(SymbolicLinkHandle);
LocalFree(Expanded);
RtlFreeUnicodeString(&NtPathName);
@ -1557,7 +1557,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
}
else
{
DPRINT1("Error, Status = %08X\n", Status);
DPRINT("Error, Status = %08X\n", Status);
if (SymbolicLinkHandle) NtClose(SymbolicLinkHandle);
LocalFree(Expanded);
RtlFreeUnicodeString(&NtPathName);
@ -1566,7 +1566,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
}
else
{
DPRINT1("Error, Status = %08X\n", Status);
DPRINT("Error, Status = %08X\n", Status);
if (SymbolicLinkHandle) NtClose(SymbolicLinkHandle);
LocalFree(Expanded);
RtlFreeUnicodeString(&NtPathName);
@ -1575,7 +1575,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
}
else
{
DPRINT1("Error, Status = %08X\n", Status);
DPRINT("Error, Status = %08X\n", Status);
LocalFree(Expanded);
return ERROR_INVALID_PARAMETER;
}
@ -1608,7 +1608,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
if (*lpCanonName == NULL)
{
DPRINT1("Error allocating memory for canonized service name!\n");
DPRINT("Error allocating memory for canonized service name!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1632,7 +1632,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
if (*lpCanonName == NULL)
{
DPRINT1("Error allocating memory for canonized service name!\n");
DPRINT("Error allocating memory for canonized service name!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1653,7 +1653,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
if (*lpCanonName == NULL)
{
DPRINT1("Error allocating memory for canonized service name!\n");
DPRINT("Error allocating memory for canonized service name!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1666,7 +1666,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
/* It seems to be a DOS path, convert it */
if (!RtlDosPathNameToNtPathName_U(lpServiceName, &NtServiceName, NULL, NULL))
{
DPRINT1("RtlDosPathNameToNtPathName_U() failed!\n");
DPRINT("RtlDosPathNameToNtPathName_U() failed!\n");
return ERROR_INVALID_PARAMETER;
}
@ -1674,7 +1674,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
if (*lpCanonName == NULL)
{
DPRINT1("Error allocating memory for canonized service name!\n");
DPRINT("Error allocating memory for canonized service name!\n");
RtlFreeUnicodeString(&NtServiceName);
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -1697,7 +1697,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
{
/* There is a problem, free name and return */
LocalFree(*lpCanonName);
DPRINT1("Error converting named!\n");
DPRINT("Error converting named!\n");
return Result;
}
@ -1759,7 +1759,7 @@ DWORD RCreateServiceW(
hManager = (PMANAGER_HANDLE)hSCManager;
if (!hManager || hManager->Handle.Tag != MANAGER_TAG)
{
DPRINT1("Invalid manager handle!\n");
DPRINT("Invalid manager handle!\n");
return ERROR_INVALID_HANDLE;
}
@ -1767,8 +1767,8 @@ DWORD RCreateServiceW(
if (!RtlAreAllAccessesGranted(hManager->Handle.DesiredAccess,
SC_MANAGER_CREATE_SERVICE))
{
DPRINT1("Insufficient access rights! 0x%lx\n",
hManager->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n",
hManager->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
@ -2086,8 +2086,8 @@ DWORD REnumDependentServicesW(
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SC_MANAGER_ENUMERATE_SERVICE))
{
DPRINT1("Insufficient access rights! 0x%lx\n",
hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n",
hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
@ -2123,7 +2123,7 @@ DWORD REnumDependentServicesW(
(dwServicesReturned + 1) * sizeof(PSERVICE));
if (!lpServicesArray)
{
DPRINT1("Could not allocate a buffer!!\n");
DPRINT("Could not allocate a buffer!!\n");
dwError = ERROR_NOT_ENOUGH_MEMORY;
goto Done;
}
@ -2214,7 +2214,7 @@ DWORD REnumServicesStatusW(
hManager = (PMANAGER_HANDLE)hSCManager;
if (!hManager || hManager->Handle.Tag != MANAGER_TAG)
{
DPRINT1("Invalid manager handle!\n");
DPRINT("Invalid manager handle!\n");
return ERROR_INVALID_HANDLE;
}
@ -2237,7 +2237,7 @@ DWORD REnumServicesStatusW(
if (!RtlAreAllAccessesGranted(hManager->Handle.DesiredAccess,
SC_MANAGER_ENUMERATE_SERVICE))
{
DPRINT1("Insufficient access rights! 0x%lx\n",
DPRINT("Insufficient access rights! 0x%lx\n",
hManager->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
@ -2418,7 +2418,7 @@ DWORD ROpenSCManagerW(
&hHandle);
if (dwError != ERROR_SUCCESS)
{
DPRINT1("ScmCreateManagerHandle() failed (Error %lu)\n", dwError);
DPRINT("ScmCreateManagerHandle() failed (Error %lu)\n", dwError);
return dwError;
}
@ -2427,7 +2427,7 @@ DWORD ROpenSCManagerW(
dwDesiredAccess | SC_MANAGER_CONNECT);
if (dwError != ERROR_SUCCESS)
{
DPRINT1("ScmCheckAccess() failed (Error %lu)\n", dwError);
DPRINT("ScmCheckAccess() failed (Error %lu)\n", dwError);
HeapFree(GetProcessHeap(), 0, hHandle);
return dwError;
}
@ -2465,7 +2465,7 @@ DWORD ROpenServiceW(
hManager = (PMANAGER_HANDLE)hSCManager;
if (!hManager || hManager->Handle.Tag != MANAGER_TAG)
{
DPRINT1("Invalid manager handle!\n");
DPRINT("Invalid manager handle!\n");
return ERROR_INVALID_HANDLE;
}
@ -2490,7 +2490,7 @@ DWORD ROpenServiceW(
&hHandle);
if (dwError != ERROR_SUCCESS)
{
DPRINT1("ScmCreateServiceHandle() failed (Error %lu)\n", dwError);
DPRINT("ScmCreateServiceHandle() failed (Error %lu)\n", dwError);
return dwError;
}
@ -2499,7 +2499,7 @@ DWORD ROpenServiceW(
dwDesiredAccess);
if (dwError != ERROR_SUCCESS)
{
DPRINT1("ScmCheckAccess() failed (Error %lu)\n", dwError);
DPRINT("ScmCheckAccess() failed (Error %lu)\n", dwError);
HeapFree(GetProcessHeap(), 0, hHandle);
return dwError;
}
@ -2545,21 +2545,21 @@ DWORD RQueryServiceConfigW(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_QUERY_CONFIG))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -2753,21 +2753,21 @@ DWORD RStartServiceW(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_START))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -2810,7 +2810,7 @@ DWORD RGetServiceDisplayNameW(
// hManager = (PMANAGER_HANDLE)hSCManager;
// if (hManager->Handle.Tag != MANAGER_TAG)
// {
// DPRINT1("Invalid manager handle!\n");
// DPRINT("Invalid manager handle!\n");
// return ERROR_INVALID_HANDLE;
// }
@ -2818,7 +2818,7 @@ DWORD RGetServiceDisplayNameW(
lpService = ScmGetServiceEntryByName(lpServiceName);
if (lpService == NULL)
{
DPRINT1("Could not find a service!\n");
DPRINT("Could not find a service!\n");
/* If the service could not be found and lpcchBuffer is less than 2, windows
puts null in lpDisplayName and puts 2 in lpcchBuffer */
@ -2884,7 +2884,7 @@ DWORD RGetServiceKeyNameW(
// hManager = (PMANAGER_HANDLE)hSCManager;
// if (hManager->Handle.Tag != MANAGER_TAG)
// {
// DPRINT1("Invalid manager handle!\n");
// DPRINT("Invalid manager handle!\n");
// return ERROR_INVALID_HANDLE;
// }
@ -2892,7 +2892,7 @@ DWORD RGetServiceKeyNameW(
lpService = ScmGetServiceEntryByDisplayName(lpDisplayName);
if (lpService == NULL)
{
DPRINT1("Could not find a service!\n");
DPRINT("Could not find a service!\n");
/* If the service could not be found and lpcchBuffer is less than 2, windows
puts null in lpDisplayName and puts 2 in lpcchBuffer */
@ -2979,21 +2979,21 @@ DWORD RChangeServiceConfigA(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_CHANGE_CONFIG))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -3002,7 +3002,7 @@ DWORD RChangeServiceConfigA(
if (lpService->bDeleted)
{
/* FIXME: Unlock database */
DPRINT1("The service has already been marked for delete!\n");
DPRINT("The service has already been marked for delete!\n");
return ERROR_SERVICE_MARKED_FOR_DELETE;
}
@ -3414,8 +3414,8 @@ DWORD REnumDependentServicesA(
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SC_MANAGER_ENUMERATE_SERVICE))
{
DPRINT1("Insufficient access rights! 0x%lx\n",
hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n",
hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
@ -3456,7 +3456,7 @@ DWORD REnumDependentServicesA(
(dwServicesReturned + 1) * sizeof(PSERVICE));
if (!lpServicesArray)
{
DPRINT1("Could not allocate a buffer!!\n");
DPRINT("Could not allocate a buffer!!\n");
dwError = ERROR_NOT_ENOUGH_MEMORY;
goto Done;
}
@ -3554,7 +3554,7 @@ DWORD REnumServicesStatusA(
lpStatusPtrW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwBufSize);
if (!lpStatusPtrW)
{
DPRINT1("Failed to allocate buffer!\n");
DPRINT("Failed to allocate buffer!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
}
@ -3719,21 +3719,21 @@ DWORD RQueryServiceConfigA(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_QUERY_CONFIG))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -3952,7 +3952,7 @@ DWORD RStartServiceA(
PSERVICE_HANDLE hSvc;
PSERVICE lpService = NULL;
DPRINT1("RStartServiceA() called\n");
DPRINT("RStartServiceA() called\n");
if (ScmShutdown)
return ERROR_SHUTDOWN_IN_PROGRESS;
@ -3960,21 +3960,21 @@ DWORD RStartServiceA(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_START))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -4017,7 +4017,7 @@ DWORD RGetServiceDisplayNameA(
// hManager = (PMANAGER_HANDLE)hSCManager;
// if (hManager->Handle.Tag != MANAGER_TAG)
// {
// DPRINT1("Invalid manager handle!\n");
// DPRINT("Invalid manager handle!\n");
// return ERROR_INVALID_HANDLE;
// }
@ -4044,7 +4044,7 @@ DWORD RGetServiceDisplayNameA(
if (lpService == NULL)
{
DPRINT1("Could not find a service!\n");
DPRINT("Could not find a service!\n");
/* If the service could not be found and lpcchBuffer is 0, windows
puts null in lpDisplayName and puts 1 in lpcchBuffer */
@ -4140,7 +4140,7 @@ DWORD RGetServiceKeyNameA(
if (lpService == NULL)
{
DPRINT1("Could not find the service!\n");
DPRINT("Could not find the service!\n");
/* If the service could not be found and lpcchBuffer is 0,
put null in lpDisplayName and puts 1 in lpcchBuffer, verified WINXP. */
@ -4341,21 +4341,21 @@ DWORD RChangeServiceConfig2W(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_CHANGE_CONFIG))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -4364,7 +4364,7 @@ DWORD RChangeServiceConfig2W(
if (lpService->bDeleted)
{
/* FIXME: Unlock database */
DPRINT1("The service has already been marked for delete!\n");
DPRINT("The service has already been marked for delete!\n");
return ERROR_SERVICE_MARKED_FOR_DELETE;
}
@ -4385,7 +4385,7 @@ DWORD RChangeServiceConfig2W(
if (lpServiceDescription != NULL &&
lpServiceDescription->lpDescription != NULL)
{
DPRINT1("Setting value %S\n", lpServiceDescription->lpDescription);
DPRINT("Setting value %S\n", lpServiceDescription->lpDescription);
RegSetValueExW(hServiceKey,
L"Description",
0,
@ -4430,8 +4430,8 @@ DWORD RQueryServiceConfig2A(
LPWSTR lpDescriptionW = NULL;
LPSTR lpDescription = NULL;
DPRINT1("RQueryServiceConfig2A() called hService %p dwInfoLevel %u, lpBuffer %p cbBufSize %u pcbBytesNeeded %p\n",
hService, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded);
DPRINT("RQueryServiceConfig2A() called hService %p dwInfoLevel %u, lpBuffer %p cbBufSize %u pcbBytesNeeded %p\n",
hService, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded);
if (!lpBuffer)
return ERROR_INVALID_ADDRESS;
@ -4442,21 +4442,21 @@ DWORD RQueryServiceConfig2A(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_QUERY_CONFIG))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -4562,21 +4562,21 @@ DWORD RQueryServiceConfig2W(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_QUERY_CONFIG))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -4715,21 +4715,21 @@ DWORD RQueryServiceStatusEx(
hSvc = (PSERVICE_HANDLE)hService;
if (!hSvc || hSvc->Handle.Tag != SERVICE_TAG)
{
DPRINT1("Invalid handle tag!\n");
DPRINT("Invalid handle tag!\n");
return ERROR_INVALID_HANDLE;
}
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
SERVICE_QUERY_STATUS))
{
DPRINT1("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n", hSvc->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}
lpService = hSvc->ServiceEntry;
if (lpService == NULL)
{
DPRINT1("lpService == NULL!\n");
DPRINT("lpService == NULL!\n");
return ERROR_INVALID_HANDLE;
}
@ -4775,7 +4775,7 @@ DWORD REnumServicesStatusExA(
pszGroupNameW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (strlen(pszGroupName) + 1) * sizeof(WCHAR));
if (!pszGroupNameW)
{
DPRINT1("Failed to allocate buffer!\n");
DPRINT("Failed to allocate buffer!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
@ -4792,7 +4792,7 @@ DWORD REnumServicesStatusExA(
lpStatusPtrW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cbBufSize);
if (!lpStatusPtrW)
{
DPRINT1("Failed to allocate buffer!\n");
DPRINT("Failed to allocate buffer!\n");
return ERROR_NOT_ENOUGH_MEMORY;
}
}
@ -4908,7 +4908,7 @@ DWORD REnumServicesStatusExW(
hManager = (PMANAGER_HANDLE)hSCManager;
if (!hManager || hManager->Handle.Tag != MANAGER_TAG)
{
DPRINT1("Invalid manager handle!\n");
DPRINT("Invalid manager handle!\n");
return ERROR_INVALID_HANDLE;
}
@ -4917,13 +4917,13 @@ DWORD REnumServicesStatusExW(
if ((dwServiceType!=SERVICE_DRIVER) && (dwServiceType!=SERVICE_WIN32))
{
DPRINT1("Not a valid Service Type!\n");
DPRINT("Not a valid Service Type!\n");
return ERROR_INVALID_PARAMETER;
}
if ((dwServiceState<SERVICE_ACTIVE) || (dwServiceState>SERVICE_STATE_ALL))
{
DPRINT1("Not a valid Service State!\n");
DPRINT("Not a valid Service State!\n");
return ERROR_INVALID_PARAMETER;
}
@ -4931,8 +4931,8 @@ DWORD REnumServicesStatusExW(
if (!RtlAreAllAccessesGranted(hManager->Handle.DesiredAccess,
SC_MANAGER_ENUMERATE_SERVICE))
{
DPRINT1("Insufficient access rights! 0x%lx\n",
hManager->Handle.DesiredAccess);
DPRINT("Insufficient access rights! 0x%lx\n",
hManager->Handle.DesiredAccess);
return ERROR_ACCESS_DENIED;
}