38 TRACE(
"SVCCTL_HANDLEA_bind(%s)\n",
49 ERR(
"RpcStringBindingCompose returned 0x%x\n",
status);
58 ERR(
"RpcBindingFromStringBinding returned 0x%x\n",
status);
64 ERR(
"RpcStringFree returned 0x%x\n",
status);
77 TRACE(
"SVCCTL_HANDLEA_unbind(%s %p)\n",
83 ERR(
"RpcBindingFree returned 0x%x\n",
status);
95 TRACE(
"SVCCTL_HANDLEW_bind(%s)\n",
106 ERR(
"RpcStringBindingCompose returned 0x%x\n",
status);
115 ERR(
"RpcBindingFromStringBinding returned 0x%x\n",
status);
121 ERR(
"RpcStringFree returned 0x%x\n",
status);
134 TRACE(
"SVCCTL_HANDLEW_unbind(%s %p)\n",
140 ERR(
"RpcBindingFree returned 0x%x\n",
status);
148 TRACE(
"ScmRpcStatusToWinError(%lx)\n",
179 struct ustring inData, keyData, outData;
189 ERR(
"SystemFunction028 failed (Status 0x%08lx)\n",
Status);
195 inData.
Buffer = (
unsigned char *)pClearTextPassword;
197 keyData.
Length =
sizeof(SessionKey);
199 keyData.
Buffer = SessionKey;
211 ERR(
"SystemFunction004 failed (Status 0x%08lx)\n",
Status);
229 ERR(
"SystemFunction004 failed (Status 0x%08lx)\n",
Status);
234 *pEncryptedPassword = outData.
Buffer;
235 *pEncryptedPasswordSize = outData.
Length;
254 TRACE(
"ChangeServiceConfig2A(%p %lu %p)\n",
290 TRACE(
"RChangeServiceConfig2A() failed (Error %lu)\n", dwError);
312 TRACE(
"ChangeServiceConfig2W(%p %lu %p)\n",
348 TRACE(
"RChangeServiceConfig2W() failed (Error %lu)\n", dwError);
366 DWORD dwErrorControl,
371 LPCSTR lpServiceStartName,
376 DWORD dwDependenciesLength = 0;
379 DWORD dwPasswordSize = 0;
383 TRACE(
"ChangeServiceConfigA(%p %lu %lu %lu %s %s %p %s %s %s %s)\n",
384 hService, dwServiceType, dwStartType, dwErrorControl,
debugstr_a(lpBinaryPathName),
389 if (lpDependencies !=
NULL)
391 lpStr = lpDependencies;
394 cchLength =
strlen(lpStr) + 1;
395 dwDependenciesLength += (
DWORD)cchLength;
396 lpStr = lpStr + cchLength;
398 dwDependenciesLength++;
401 if (lpPassword !=
NULL)
407 if (lpPasswordW ==
NULL)
418 (
int)(
strlen(lpPassword) + 1));
423 &lpEncryptedPassword,
435 (
LPSTR)lpBinaryPathName,
436 (
LPSTR)lpLoadOrderGroup,
439 dwDependenciesLength,
440 (
LPSTR)lpServiceStartName,
452 if (lpPasswordW !=
NULL)
458 if (lpEncryptedPassword !=
NULL)
467 TRACE(
"RChangeServiceConfigA() failed (Error %lu)\n", dwError);
485 DWORD dwErrorControl,
495 DWORD dwDependenciesLength = 0;
498 DWORD dwPasswordSize = 0;
501 TRACE(
"ChangeServiceConfigW(%p %lu %lu %lu %s %s %p %s %s %s %s)\n",
502 hService, dwServiceType, dwStartType, dwErrorControl,
debugstr_w(lpBinaryPathName),
507 if (lpDependencies !=
NULL)
509 lpStr = lpDependencies;
512 cchLength =
wcslen(lpStr) + 1;
513 dwDependenciesLength += (
DWORD)cchLength;
514 lpStr = lpStr + cchLength;
516 dwDependenciesLength++;
517 dwDependenciesLength *=
sizeof(
WCHAR);
520 if (lpPassword !=
NULL)
524 &lpEncryptedPassword,
528 ERR(
"ScmEncryptPassword failed (Error %lu)\n", dwError);
543 dwDependenciesLength,
544 (
LPWSTR)lpServiceStartName,
556 if (lpEncryptedPassword !=
NULL)
565 TRACE(
"RChangeServiceConfigW() failed (Error %lu)\n", dwError);
584 TRACE(
"CloseServiceHandle(%p)\n",
605 TRACE(
"RCloseServiceHandle() failed (Error %lu)\n", dwError);
610 TRACE(
"CloseServiceHandle() done\n");
628 TRACE(
"ControlService(%p %lu %p)\n",
629 hService, dwControl, lpServiceStatus);
645 TRACE(
"RControlService() failed (Error %lu)\n", dwError);
650 TRACE(
"ControlService() done\n");
667 FIXME(
"ControlServiceEx(%p %lu %lu %p)\n",
683 DWORD dwDesiredAccess,
686 DWORD dwErrorControl,
691 LPCSTR lpServiceStartName,
694 SC_HANDLE hService =
NULL;
695 DWORD dwDependenciesLength = 0;
699 DWORD dwPasswordSize = 0;
703 TRACE(
"CreateServiceA(%p %s %s %lx %lu %lu %lu %s %s %p %s %s %s)\n",
705 dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl,
716 if (lpDependencies !=
NULL)
718 lpStr = lpDependencies;
721 cchLength =
strlen(lpStr) + 1;
722 dwDependenciesLength += (
DWORD)cchLength;
723 lpStr = lpStr + cchLength;
725 dwDependenciesLength++;
728 if (lpPassword !=
NULL)
734 if (lpPasswordW ==
NULL)
745 (
int)(
strlen(lpPassword) + 1));
750 &lpEncryptedPassword,
759 (
LPSTR)lpServiceName,
765 (
LPSTR)lpBinaryPathName,
766 (
LPSTR)lpLoadOrderGroup,
769 dwDependenciesLength,
770 (
LPSTR)lpServiceStartName,
782 if (lpPasswordW !=
NULL)
788 if (lpEncryptedPassword !=
NULL)
798 TRACE(
"RCreateServiceA() failed (Error %lu)\n", dwError);
815 DWORD dwDesiredAccess,
818 DWORD dwErrorControl,
826 SC_HANDLE hService =
NULL;
827 DWORD dwDependenciesLength = 0;
831 DWORD dwPasswordSize = 0;
834 TRACE(
"CreateServiceW(%p %s %s %lx %lu %lu %lu %s %s %p %s %s %s)\n",
836 dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl,
847 if (lpDependencies !=
NULL)
849 lpStr = lpDependencies;
852 cchLength =
wcslen(lpStr) + 1;
853 dwDependenciesLength += (
DWORD)cchLength;
854 lpStr = lpStr + cchLength;
856 dwDependenciesLength++;
857 dwDependenciesLength *=
sizeof(
WCHAR);
860 if (lpPassword !=
NULL)
865 &lpEncryptedPassword,
884 dwDependenciesLength,
897 if (lpEncryptedPassword !=
NULL)
907 TRACE(
"RCreateServiceW() failed (Error %lu)\n", dwError);
925 TRACE(
"DeleteService(%p)\n",
940 TRACE(
"RDeleteService() failed (Error %lu)\n", dwError);
956 DWORD dwServiceState,
968 TRACE(
"EnumDependentServicesA(%p %lu %p %lu %p %p)\n",
969 hService, dwServiceState, lpServices,
cbBufSize,
979 lpStatusPtr = lpServices;
1000 for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
1016 TRACE(
"REnumDependentServicesA() failed (Error %lu)\n", dwError);
1021 TRACE(
"EnumDependentServicesA() done\n");
1034 DWORD dwServiceState,
1046 TRACE(
"EnumDependentServicesW(%p %lu %p %lu %p %p)\n",
1047 hService, dwServiceState, lpServices,
cbBufSize,
1057 lpStatusPtr = lpServices;
1068 lpServicesReturned);
1078 for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
1094 TRACE(
"REnumDependentServicesW() failed (Error %lu)\n", dwError);
1099 TRACE(
"EnumDependentServicesW() done\n");
1112 DWORD dwServiceType,
1113 DWORD dwServiceState,
1127 TRACE(
"EnumServiceGroupW(%p %lu %lu %p %lu %p %p %p %s)\n",
1128 hSCManager, dwServiceType, dwServiceState, lpServices,
1151 lpStatusPtr = lpServices;
1157 if (lpGroup ==
NULL)
1189 for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
1205 TRACE(
"REnumServiceGroupW() failed (Error %lu)\n", dwError);
1210 TRACE(
"EnumServiceGroupW() done\n");
1223 DWORD dwServiceType,
1224 DWORD dwServiceState,
1237 TRACE(
"EnumServicesStatusA(%p %lu %lu %p %lu %p %p %p)\n",
1238 hSCManager, dwServiceType, dwServiceState, lpServices,
1260 lpStatusPtr = lpServices;
1283 for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
1299 TRACE(
"REnumServicesStatusA() failed (Error %lu)\n", dwError);
1304 TRACE(
"EnumServicesStatusA() done\n");
1317 DWORD dwServiceType,
1318 DWORD dwServiceState,
1331 TRACE(
"EnumServicesStatusW(%p %lu %lu %p %lu %p %p %p)\n",
1332 hSCManager, dwServiceType, dwServiceState, lpServices,
1354 lpStatusPtr = lpServices;
1377 for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
1393 TRACE(
"REnumServicesStatusW() failed (Error %lu)\n", dwError);
1398 TRACE(
"EnumServicesStatusW() done\n");
1412 DWORD dwServiceType,
1413 DWORD dwServiceState,
1427 TRACE(
"EnumServicesStatusExA(%p %lu %lu %p %lu %p %p %p %s)\n",
1428 hSCManager, dwServiceType, dwServiceState, lpServices,
1472 (
LPSTR)pszGroupName);
1484 for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
1501 TRACE(
"REnumServicesStatusExA() failed (Error %lu)\n", dwError);
1506 TRACE(
"EnumServicesStatusExA() done\n");
1520 DWORD dwServiceType,
1521 DWORD dwServiceState,
1535 TRACE(
"EnumServicesStatusExW(%p %lu %lu %p %lu %p %p %p %s)\n",
1536 hSCManager, dwServiceType, dwServiceState, lpServices,
1592 for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
1609 TRACE(
"REnumServicesStatusExW() failed (Error %lu)\n", dwError);
1614 TRACE(
"EnumServicesStatusExW() done\n");
1633 CHAR szEmptyName[] =
"";
1635 TRACE(
"GetServiceDisplayNameA(%p %s %p %p)\n",
1647 *lpcchBuffer =
sizeof(
CHAR);
1669 TRACE(
"RGetServiceDisplayNameA() failed (Error %lu)\n", dwError);
1691 WCHAR szEmptyName[] =
L"";
1693 TRACE(
"GetServiceDisplayNameW(%p %s %p %p)\n",
1710 *lpcchBuffer =
sizeof(
WCHAR);
1732 TRACE(
"RGetServiceDisplayNameW() failed (Error %lu)\n", dwError);
1749 LPSTR lpServiceName,
1754 CHAR szEmptyName[] =
"";
1756 TRACE(
"GetServiceKeyNameA(%p %s %p %p)\n",
1765 if (!lpServiceName || *lpcchBuffer <
sizeof(
CHAR))
1768 *lpcchBuffer =
sizeof(
CHAR);
1791 TRACE(
"RGetServiceKeyNameA() failed (Error %lu)\n", dwError);
1813 WCHAR szEmptyName[] =
L"";
1815 TRACE(
"GetServiceKeyNameW(%p %s %p %p)\n",
1829 if (!lpServiceName || *lpcchBuffer <
sizeof(
WCHAR))
1832 *lpcchBuffer =
sizeof(
WCHAR);
1854 TRACE(
"RGetServiceKeyNameW() failed (Error %lu)\n", dwError);
1875 TRACE(
"I_ScGetCurrentGroupStateW(%p %s %p)\n",
1892 TRACE(
"RI_ScGetCurrentGroupStateW() failed (Error %lu)\n", dwError);
1918 TRACE(
"I_ScValidatePnpService(%S %S %p)\n",
1919 pszMachineName, pszServiceName, phServiceStatus);
1963 TRACE(
"LockServiceDatabase(%p)\n",
1979 TRACE(
"RLockServiceDatabase() failed (Error %lu)\n", dwError);
1984 TRACE(
"hLock = %p\n", hLock);
1995 TRACE(
"WaitForSCManager()\n");
2014 TRACE(
"ScmWaitForSCManager() done\n");
2026 DWORD dwDesiredAccess)
2028 SC_HANDLE hScm =
NULL;
2031 TRACE(
"OpenSCManagerA(%s %s %lx)\n",
2039 (
LPSTR)lpDatabaseName,
2052 TRACE(
"ROpenSCManagerA() failed (Error %lu)\n", dwError);
2056 TRACE(
"hScm = %p\n", hScm);
2070 DWORD dwDesiredAccess)
2072 SC_HANDLE hScm =
NULL;
2075 TRACE(
"OpenSCManagerW(%s %s %lx)\n",
2096 TRACE(
"ROpenSCManagerW() failed (Error %lu)\n", dwError);
2100 TRACE(
"hScm = %p\n", hScm);
2114 DWORD dwDesiredAccess)
2116 SC_HANDLE hService =
NULL;
2119 TRACE(
"OpenServiceA(%p %s %lx)\n",
2131 (
LPSTR)lpServiceName,
2144 TRACE(
"ROpenServiceA() failed (Error %lu)\n", dwError);
2148 TRACE(
"hService = %p\n", hService);
2162 DWORD dwDesiredAccess)
2164 SC_HANDLE hService =
NULL;
2167 TRACE(
"OpenServiceW(%p %s %lx)\n",
2192 TRACE(
"ROpenServiceW() failed (Error %lu)\n", dwError);
2196 TRACE(
"hService = %p\n", hService);
2218 TRACE(
"QueryServiceConfigA(%p %p %lu %p)\n",
2221 if (lpServiceConfig ==
NULL ||
2224 lpConfigPtr = &ServiceConfig;
2229 lpConfigPtr = lpServiceConfig;
2248 TRACE(
"RQueryServiceConfigA() failed (Error %lu)\n", dwError);
2279 TRACE(
"QueryServiceConfigA() done\n");
2301 TRACE(
"QueryServiceConfigW(%p %p %lu %p)\n",
2304 if (lpServiceConfig ==
NULL ||
2307 lpConfigPtr = &ServiceConfig;
2312 lpConfigPtr = lpServiceConfig;
2331 TRACE(
"RQueryServiceConfigW() failed (Error %lu)\n", dwError);
2362 TRACE(
"QueryServiceConfigW() done\n");
2387 TRACE(
"QueryServiceConfig2A(%p %lu %p %lu %p)\n",
2398 lpTempBuffer = (
LPBYTE)&ServiceDescription;
2400 bUseTempBuffer =
TRUE;
2407 lpTempBuffer = (
LPBYTE)&ServiceFailureActions;
2409 bUseTempBuffer =
TRUE;
2435 TRACE(
"RQueryServiceConfig2A() failed (Error %lu)\n", dwError);
2440 if (bUseTempBuffer !=
FALSE)
2442 TRACE(
"RQueryServiceConfig2A() returns ERROR_INSUFFICIENT_BUFFER\n");
2479 TRACE(
"QueryServiceConfig2A() done\n");
2504 TRACE(
"QueryServiceConfig2W(%p %lu %p %lu %p)\n",
2515 lpTempBuffer = (
LPBYTE)&ServiceDescription;
2517 bUseTempBuffer =
TRUE;
2524 lpTempBuffer = (
LPBYTE)&ServiceFailureActions;
2526 bUseTempBuffer =
TRUE;
2552 TRACE(
"RQueryServiceConfig2W() failed (Error %lu)\n", dwError);
2557 if (bUseTempBuffer !=
FALSE)
2559 TRACE(
"RQueryServiceConfig2W() returns ERROR_INSUFFICIENT_BUFFER\n");
2596 TRACE(
"QueryServiceConfig2W() done\n");
2618 TRACE(
"QueryServiceLockStatusA(%p %p %lu %p)\n",
2623 lpStatusPtr = &LockStatus;
2628 lpStatusPtr = lpLockStatus;
2647 TRACE(
"RQueryServiceLockStatusA() failed (Error %lu)\n", dwError);
2658 TRACE(
"QueryServiceLockStatusA() done\n");
2680 TRACE(
"QueryServiceLockStatusW(%p %p %lu %p)\n",
2685 lpStatusPtr = &LockStatus;
2690 lpStatusPtr = lpLockStatus;
2709 TRACE(
"RQueryServiceLockStatusW() failed (Error %lu)\n", dwError);
2720 TRACE(
"QueryServiceLockStatusW() done\n");
2740 TRACE(
"QueryServiceObjectSecurity(%p %lu %p)\n",
2741 hService, dwSecurityInformation, lpSecurityDescriptor);
2746 dwSecurityInformation,
2747 (
LPBYTE)lpSecurityDescriptor,
2759 TRACE(
"QueryServiceObjectSecurity() failed (Error %lu)\n", dwError);
2783 TRACE(
"SetServiceObjectSecurity(%p %lu %p)\n",
2784 hService, dwSecurityInformation, lpSecurityDescriptor);
2797 if (SelfRelativeSD ==
NULL)
2816 dwSecurityInformation,
2830 TRACE(
"RServiceObjectSecurity() failed (Error %lu)\n", dwError);
2850 TRACE(
"QueryServiceStatus(%p %p)\n",
2851 hService, lpServiceStatus);
2872 TRACE(
"RQueryServiceStatus() failed (Error %lu)\n", dwError);
2895 TRACE(
"QueryServiceStatusEx(%p %lu %p %lu %p)\n",
2927 TRACE(
"RQueryServiceStatusEx() failed (Error %lu)\n", dwError);
2943 DWORD dwNumServiceArgs,
2944 LPCSTR *lpServiceArgVectors)
2948 TRACE(
"StartServiceA(%p %lu %p)\n",
2949 hService, dwNumServiceArgs, lpServiceArgVectors);
2965 ERR(
"RStartServiceA() failed (Error %lu)\n", dwError);
2981 DWORD dwNumServiceArgs,
2986 TRACE(
"StartServiceW(%p %lu %p)\n",
2987 hService, dwNumServiceArgs, lpServiceArgVectors);
3003 ERR(
"RStartServiceW() failed (Error %lu)\n", dwError);
3022 TRACE(
"UnlockServiceDatabase(%x)\n",
3040 TRACE(
"RUnlockServiceDatabase() failed (Error %lu)\n", dwError);
3059 TRACE(
"NotifyBootConfigStatus(%u)\n",
3075 TRACE(
"NotifyBootConfigStatus() failed (Error %lu)\n", dwError);
3141 if (OutParams ==
NULL ||
3151 if (lpszName ==
NULL)
3165 if (OutParams !=
NULL)
3193 InOutParams ==
NULL)
static SERVICE_STATUS_HANDLE(WINAPI *pRegisterServiceCtrlHandlerExA)(LPCSTR
ACPI_SIZE strlen(const char *String)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static SERVICE_STATUS ServiceStatus
DWORD WINAPI RCloseServiceHandle(LPSC_RPC_HANDLE hSCObject)
DWORD WINAPI RChangeServiceConfig2W(SC_RPC_HANDLE hService, SC_RPC_CONFIG_INFOW Info)
DWORD WINAPI RDeleteService(SC_RPC_HANDLE hService)
DWORD WINAPI RQueryServiceLockStatusW(SC_RPC_HANDLE hSCManager, LPBYTE lpBuf, DWORD cbBufSize, LPBOUNDED_DWORD_4K pcbBytesNeeded)
DWORD WINAPI RQueryServiceObjectSecurity(SC_RPC_HANDLE hService, SECURITY_INFORMATION dwSecurityInformation, LPBYTE lpSecurityDescriptor, DWORD cbBufSize, LPBOUNDED_DWORD_256K pcbBytesNeeded)
DWORD WINAPI RChangeServiceConfig2A(SC_RPC_HANDLE hService, SC_RPC_CONFIG_INFOA Info)
DWORD WINAPI ROpenSCManagerW(LPWSTR lpMachineName, LPWSTR lpDatabaseName, DWORD dwDesiredAccess, LPSC_RPC_HANDLE lpScHandle)
DWORD WINAPI RNotifyBootConfigStatus(SVCCTL_HANDLEW lpMachineName, DWORD BootAcceptable)
DWORD WINAPI RStartServiceW(SC_RPC_HANDLE hService, DWORD argc, LPSTRING_PTRSW argv)
DWORD WINAPI RGetServiceKeyNameA(SC_RPC_HANDLE hSCManager, LPCSTR lpDisplayName, LPSTR lpServiceName, LPBOUNDED_DWORD_4K lpcchBuffer)
DWORD WINAPI RCreateServiceW(SC_RPC_HANDLE hSCManager, LPCWSTR lpServiceName, LPCWSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPBYTE lpDependencies, DWORD dwDependSize, LPCWSTR lpServiceStartName, LPBYTE lpPassword, DWORD dwPwSize, LPSC_RPC_HANDLE lpServiceHandle)
DWORD WINAPI RUnlockServiceDatabase(LPSC_RPC_LOCK Lock)
DWORD WINAPI ROpenServiceW(SC_RPC_HANDLE hSCManager, LPWSTR lpServiceName, DWORD dwDesiredAccess, LPSC_RPC_HANDLE lpServiceHandle)
DWORD WINAPI RChangeServiceConfigW(SC_RPC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPWSTR lpBinaryPathName, LPWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPBYTE lpDependencies, DWORD dwDependSize, LPWSTR lpServiceStartName, LPBYTE lpPassword, DWORD dwPwSize, LPWSTR lpDisplayName)
DWORD WINAPI REnumServicesStatusA(SC_RPC_HANDLE hSCManager, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpBuffer, DWORD dwBufSize, LPBOUNDED_DWORD_256K pcbBytesNeeded, LPBOUNDED_DWORD_256K lpServicesReturned, LPBOUNDED_DWORD_256K lpResumeHandle)
DWORD WINAPI RLockServiceDatabase(SC_RPC_HANDLE hSCManager, LPSC_RPC_LOCK lpLock)
DWORD WINAPI RQueryServiceConfig2A(SC_RPC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPBOUNDED_DWORD_8K pcbBytesNeeded)
DWORD WINAPI RQueryServiceStatus(SC_RPC_HANDLE hService, LPSERVICE_STATUS lpServiceStatus)
DWORD WINAPI ROpenServiceA(SC_RPC_HANDLE hSCManager, LPSTR lpServiceName, DWORD dwDesiredAccess, LPSC_RPC_HANDLE lpServiceHandle)
DWORD WINAPI RStartServiceA(SC_RPC_HANDLE hService, DWORD argc, LPSTRING_PTRSA argv)
DWORD WINAPI RGetServiceDisplayNameW(SC_RPC_HANDLE hSCManager, LPCWSTR lpServiceName, LPWSTR lpDisplayName, DWORD *lpcchBuffer)
DWORD WINAPI RQueryServiceLockStatusA(SC_RPC_HANDLE hSCManager, LPBYTE lpBuf, DWORD cbBufSize, LPBOUNDED_DWORD_4K pcbBytesNeeded)
DWORD WINAPI RGetServiceKeyNameW(SC_RPC_HANDLE hSCManager, LPCWSTR lpDisplayName, LPWSTR lpServiceName, DWORD *lpcchBuffer)
DWORD WINAPI RControlService(SC_RPC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
DWORD WINAPI RCreateServiceA(SC_RPC_HANDLE hSCManager, LPSTR lpServiceName, LPSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPSTR lpBinaryPathName, LPSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPBYTE lpDependencies, DWORD dwDependSize, LPSTR lpServiceStartName, LPBYTE lpPassword, DWORD dwPwSize, LPSC_RPC_HANDLE lpServiceHandle)
DWORD WINAPI REnumServiceGroupW(SC_RPC_HANDLE hSCManager, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpBuffer, DWORD cbBufSize, LPBOUNDED_DWORD_256K pcbBytesNeeded, LPBOUNDED_DWORD_256K lpServicesReturned, LPBOUNDED_DWORD_256K lpResumeIndex, LPCWSTR pszGroupName)
DWORD WINAPI RQueryServiceStatusEx(SC_RPC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPBOUNDED_DWORD_8K pcbBytesNeeded)
DWORD WINAPI RI_ScQueryServiceTagInfo(SC_RPC_HANDLE hSCManager, TAG_INFO_LEVEL dwInfoLevel, PTAG_INFO_NAME_FROM_TAG_IN_PARAMS *lpInParams, PTAG_INFO_NAME_FROM_TAG_OUT_PARAMS *lpOutParams)
DWORD WINAPI RQueryServiceConfigW(SC_RPC_HANDLE hService, LPBYTE lpBuf, DWORD cbBufSize, LPBOUNDED_DWORD_8K pcbBytesNeeded)
DWORD WINAPI RQueryServiceConfig2W(SC_RPC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPBOUNDED_DWORD_8K pcbBytesNeeded)
DWORD WINAPI RI_ScValidatePnPService(_In_ SC_RPC_HANDLE hSCManager, _In_ LPWSTR pszServiceName, _Out_ RPC_SERVICE_STATUS_HANDLE *phServiceStatus)
DWORD WINAPI REnumServicesStatusExA(SC_RPC_HANDLE hSCManager, SC_ENUM_TYPE InfoLevel, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpBuffer, DWORD cbBufSize, LPBOUNDED_DWORD_256K pcbBytesNeeded, LPBOUNDED_DWORD_256K lpServicesReturned, LPBOUNDED_DWORD_256K lpResumeIndex, LPCSTR pszGroupName)
DWORD WINAPI REnumDependentServicesW(SC_RPC_HANDLE hService, DWORD dwServiceState, LPBYTE lpServices, DWORD cbBufSize, LPBOUNDED_DWORD_256K pcbBytesNeeded, LPBOUNDED_DWORD_256K lpServicesReturned)
DWORD WINAPI RGetServiceDisplayNameA(SC_RPC_HANDLE hSCManager, LPCSTR lpServiceName, LPSTR lpDisplayName, LPBOUNDED_DWORD_4K lpcchBuffer)
DWORD WINAPI RI_ScGetCurrentGroupStateW(SC_RPC_HANDLE hSCManager, LPWSTR lpLoadOrderGroup, LPDWORD lpState)
DWORD WINAPI ROpenSCManagerA(LPSTR lpMachineName, LPSTR lpDatabaseName, DWORD dwDesiredAccess, LPSC_RPC_HANDLE lpScHandle)
DWORD WINAPI RSetServiceObjectSecurity(SC_RPC_HANDLE hService, DWORD dwSecurityInformation, LPBYTE lpSecurityDescriptor, DWORD dwSecurityDescriptorSize)
DWORD WINAPI RChangeServiceConfigA(SC_RPC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPSTR lpBinaryPathName, LPSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPBYTE lpDependencies, DWORD dwDependSize, LPSTR lpServiceStartName, LPBYTE lpPassword, DWORD dwPwSize, LPSTR lpDisplayName)
DWORD WINAPI RQueryServiceConfigA(SC_RPC_HANDLE hService, LPBYTE lpBuf, DWORD cbBufSize, LPBOUNDED_DWORD_8K pcbBytesNeeded)
DWORD WINAPI REnumDependentServicesA(SC_RPC_HANDLE hService, DWORD dwServiceState, LPBYTE lpServices, DWORD cbBufSize, LPBOUNDED_DWORD_256K pcbBytesNeeded, LPBOUNDED_DWORD_256K lpServicesReturned)
DWORD WINAPI REnumServicesStatusExW(SC_RPC_HANDLE hSCManager, SC_ENUM_TYPE InfoLevel, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpBuffer, DWORD cbBufSize, LPBOUNDED_DWORD_256K pcbBytesNeeded, LPBOUNDED_DWORD_256K lpServicesReturned, LPBOUNDED_DWORD_256K lpResumeIndex, LPCWSTR pszGroupName)
DWORD WINAPI REnumServicesStatusW(SC_RPC_HANDLE hSCManager, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpBuffer, DWORD dwBufSize, LPBOUNDED_DWORD_256K pcbBytesNeeded, LPBOUNDED_DWORD_256K lpServicesReturned, LPBOUNDED_DWORD_256K lpResumeHandle)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_ADDRESS
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define MultiByteToWideChar
static const WCHAR Cleanup[]
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define EXCEPTION_EXECUTE_HANDLER
#define ERROR_FILE_NOT_FOUND
DWORD SECURITY_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlMakeSelfRelativeSD(_In_ PSECURITY_DESCRIPTOR AbsoluteSD, _Out_ PSECURITY_DESCRIPTOR SelfRelativeSD, _Inout_ PULONG BufferLength)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define STATUS_ACCESS_VIOLATION
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
RPC_STATUS WINAPI RpcStringBindingComposeA(RPC_CSTR ObjUuid, RPC_CSTR Protseq, RPC_CSTR NetworkAddr, RPC_CSTR Endpoint, RPC_CSTR Options, RPC_CSTR *StringBinding)
RPC_STATUS WINAPI RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE *Binding)
unsigned short * RPC_WSTR
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
NTSTATUS WINAPI SystemFunction028(IN PVOID ContextHandle, OUT LPBYTE SessionKey)
BOOL WINAPI QueryServiceStatus(SC_HANDLE hService, LPSERVICE_STATUS lpServiceStatus)
BOOL WINAPI NotifyBootConfigStatus(BOOL BootAcceptable)
BOOL WINAPI EnumServicesStatusExA(SC_HANDLE hSCManager, SC_ENUM_TYPE InfoLevel, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle, LPCSTR pszGroupName)
BOOL WINAPI DeleteService(SC_HANDLE hService)
DWORD ScmRpcStatusToWinError(RPC_STATUS Status)
void __RPC_USER SVCCTL_HANDLEW_unbind(SVCCTL_HANDLEW szMachineName, handle_t hBinding)
handle_t __RPC_USER SVCCTL_HANDLEW_bind(SVCCTL_HANDLEW szMachineName)
BOOL WINAPI StartServiceA(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCSTR *lpServiceArgVectors)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
handle_t __RPC_USER SVCCTL_HANDLEA_bind(SVCCTL_HANDLEA szMachineName)
BOOL WINAPI UnlockServiceDatabase(SC_LOCK ScLock)
void __RPC_USER SVCCTL_HANDLEA_unbind(SVCCTL_HANDLEA szMachineName, handle_t hBinding)
DWORD WINAPI I_ScGetCurrentGroupStateW(SC_HANDLE hSCManager, LPWSTR pszGroupName, LPDWORD pdwGroupState)
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
SC_HANDLE WINAPI OpenServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, DWORD dwDesiredAccess)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI QueryServiceConfigW(SC_HANDLE hService, LPQUERY_SERVICE_CONFIGW lpServiceConfig, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
BOOL WINAPI QueryServiceLockStatusA(SC_HANDLE hSCManager, LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
BOOL WINAPI GetServiceDisplayNameW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, LPWSTR lpDisplayName, LPDWORD lpcchBuffer)
BOOL WINAPI ChangeServiceConfig2A(SC_HANDLE hService, DWORD dwInfoLevel, LPVOID lpInfo)
BOOL WINAPI QueryServiceConfig2A(SC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
BOOL WINAPI GetServiceKeyNameA(SC_HANDLE hSCManager, LPCSTR lpDisplayName, LPSTR lpServiceName, LPDWORD lpcchBuffer)
BOOL WINAPI EnumServiceGroupW(SC_HANDLE hSCManager, DWORD dwServiceType, DWORD dwServiceState, LPENUM_SERVICE_STATUSW lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle, LPCWSTR lpGroup)
BOOL WINAPI EnumDependentServicesA(SC_HANDLE hService, DWORD dwServiceState, LPENUM_SERVICE_STATUSA lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned)
BOOL WINAPI GetServiceDisplayNameA(SC_HANDLE hSCManager, LPCSTR lpServiceName, LPSTR lpDisplayName, LPDWORD lpcchBuffer)
BOOL WINAPI ChangeServiceConfigW(SC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword, LPCWSTR lpDisplayName)
SC_HANDLE WINAPI CreateServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, LPCWSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword)
static DWORD ScmEncryptPassword(_In_ PVOID ContextHandle, _In_ PCWSTR pClearTextPassword, _Out_ PBYTE *pEncryptedPassword, _Out_ PDWORD pEncryptedPasswordSize)
BOOL WINAPI ControlServiceEx(IN SC_HANDLE hService, IN DWORD dwControl, IN DWORD dwInfoLevel, IN OUT PVOID pControlParams)
static VOID WaitForSCManager(VOID)
BOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE hService, SECURITY_INFORMATION dwSecurityInformation, PSECURITY_DESCRIPTOR lpSecurityDescriptor, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
BOOL WINAPI SetServiceObjectSecurity(SC_HANDLE hService, SECURITY_INFORMATION dwSecurityInformation, PSECURITY_DESCRIPTOR lpSecurityDescriptor)
BOOL WINAPI QueryServiceConfig2W(SC_HANDLE hService, DWORD dwInfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
DWORD I_ScQueryServiceTagInfo(PVOID Unused, TAG_INFO_LEVEL dwInfoLevel, PTAG_INFO_NAME_FROM_TAG InOutParams)
NTSTATUS WINAPI SystemFunction004(const struct ustring *in, const struct ustring *key, struct ustring *out)
BOOL WINAPI QueryServiceLockStatusW(SC_HANDLE hSCManager, LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
BOOL WINAPI QueryServiceConfigA(SC_HANDLE hService, LPQUERY_SERVICE_CONFIGA lpServiceConfig, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
BOOL WINAPI ChangeServiceConfigA(SC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCSTR lpBinaryPathName, LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCSTR lpDependencies, LPCSTR lpServiceStartName, LPCSTR lpPassword, LPCSTR lpDisplayName)
BOOL WINAPI EnumServicesStatusExW(SC_HANDLE hSCManager, SC_ENUM_TYPE InfoLevel, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle, LPCWSTR pszGroupName)
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
BOOL WINAPI EnumServicesStatusA(SC_HANDLE hSCManager, DWORD dwServiceType, DWORD dwServiceState, LPENUM_SERVICE_STATUSA lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle)
SC_HANDLE WINAPI CreateServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, LPCSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCSTR lpBinaryPathName, LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCSTR lpDependencies, LPCSTR lpServiceStartName, LPCSTR lpPassword)
DWORD WINAPI I_QueryTagInformation(PVOID Unused, TAG_INFO_LEVEL dwInfoLevel, PTAG_INFO_NAME_FROM_TAG InOutParams)
DWORD WINAPI I_ScValidatePnpService(_In_ LPCWSTR pszMachineName, _In_ LPCWSTR pszServiceName, _Out_ SERVICE_STATUS_HANDLE *phServiceStatus)
BOOL WINAPI ChangeServiceConfig2W(SC_HANDLE hService, DWORD dwInfoLevel, LPVOID lpInfo)
SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE hSCManager)
SC_HANDLE WINAPI OpenSCManagerA(LPCSTR lpMachineName, LPCSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
BOOL WINAPI GetServiceKeyNameW(SC_HANDLE hSCManager, LPCWSTR lpDisplayName, LPWSTR lpServiceName, LPDWORD lpcchBuffer)
BOOL WINAPI EnumServicesStatusW(SC_HANDLE hSCManager, DWORD dwServiceType, DWORD dwServiceState, LPENUM_SERVICE_STATUSW lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle)
BOOL WINAPI EnumDependentServicesW(SC_HANDLE hService, DWORD dwServiceState, LPENUM_SERVICE_STATUSW lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define RpcExceptionCode()
static LPSTR lpNameBuffer
#define STATUS_BUFFER_TOO_SMALL
LPWSTR lpServiceStartName
TAG_INFO_NAME_FROM_TAG_OUT_PARAMS OutParams
TAG_INFO_NAME_FROM_TAG_IN_PARAMS InParams
ULONG_PTR RPC_SERVICE_STATUS_HANDLE
enum _TAG_INFO_LEVEL TAG_INFO_LEVEL
@ TagInfoLevelNameFromTag
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
SERVICE_STATUS_HANDLE hServiceStatus
_In_ LPCSTR _Out_writes_to_opt_ cchDisplayName LPSTR lpDisplayName
DWORD WINAPI GetLastError(void)
#define ERROR_INVALID_LEVEL
#define RPC_X_ENUM_VALUE_OUT_OF_RANGE
#define RPC_X_SS_IN_NULL_CONTEXT
#define RPC_X_NULL_REF_POINTER
#define ERROR_INVALID_SERVICE_LOCK
#define RPC_X_BYTE_COUNT_TOO_SMALL
#define RPC_S_INVALID_BINDING
#define ERROR_INVALID_DATA
struct _QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUSW
struct _SERVICE_DESCRIPTIONA SERVICE_DESCRIPTIONA
struct _ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESSA
_In_ DWORD _In_ DWORD _Out_ LPDWORD pcbBytesNeeded
struct _SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONSW
struct _QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUSA
_In_ DWORD _In_ DWORD cbBufSize
struct _ENUM_SERVICE_STATUS_PROCESSW * LPENUM_SERVICE_STATUS_PROCESSW
#define SERVICE_CONFIG_DESCRIPTION
struct _SERVICE_DESCRIPTIONW SERVICE_DESCRIPTIONW
#define SC_MANAGER_ENUMERATE_SERVICE
struct _ENUM_SERVICE_STATUS_PROCESSA * LPENUM_SERVICE_STATUS_PROCESSA
#define SC_MANAGER_CONNECT
struct _QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIGW
struct _SERVICE_DESCRIPTIONW * LPSERVICE_DESCRIPTIONW
struct _ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUSW
struct _ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESSW
struct _SERVICE_FAILURE_ACTIONSA * LPSERVICE_FAILURE_ACTIONSA
struct _SC_ACTION * LPSC_ACTION
enum _SC_STATUS_TYPE SC_STATUS_TYPE
struct _SERVICE_DESCRIPTIONA * LPSERVICE_DESCRIPTIONA
struct _SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONSA
#define SERVICES_ACTIVE_DATABASEW
#define SERVICE_CONFIG_FAILURE_ACTIONS
struct _SERVICE_FAILURE_ACTIONSW * LPSERVICE_FAILURE_ACTIONSW
struct _SERVICE_STATUS_PROCESS SERVICE_STATUS_PROCESS
struct _ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUSA
enum _SC_ENUM_TYPE SC_ENUM_TYPE
struct _QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIGA