Author: cwittich Date: Tue Jan 6 01:53:04 2009 New Revision: 38603
URL: http://svn.reactos.org/svn/reactos?rev=38603&view=rev Log: -don't cast const char to char -handle RPC_X_ENUM_VALUE_OUT_OF_RANGE and RPC_X_BYTE_COUNT_TOO_SMALL in ScmRpcStatusToWinError -add some traces -don't write to NULL pointers, don't do strlen on a NULL pointer
Modified: trunk/reactos/base/system/services/config.c trunk/reactos/base/system/services/database.c trunk/reactos/base/system/services/groupdb.c trunk/reactos/base/system/services/rpcserver.c trunk/reactos/base/system/services/services.h trunk/reactos/dll/win32/advapi32/service/scm.c trunk/reactos/include/reactos/idl/svcctl.idl
Modified: trunk/reactos/base/system/services/config.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/config... ============================================================================== --- trunk/reactos/base/system/services/config.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/config.c [iso-8859-1] Tue Jan 6 01:53:04 2009 @@ -48,7 +48,7 @@
DWORD -ScmCreateServiceKey(LPWSTR lpServiceName, +ScmCreateServiceKey(LPCWSTR lpServiceName, REGSAM samDesired, PHKEY phKey) {
Modified: trunk/reactos/base/system/services/database.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/databa... ============================================================================== --- trunk/reactos/base/system/services/database.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/database.c [iso-8859-1] Tue Jan 6 01:53:04 2009 @@ -30,7 +30,7 @@
PSERVICE -ScmGetServiceEntryByName(LPWSTR lpServiceName) +ScmGetServiceEntryByName(LPCWSTR lpServiceName) { PLIST_ENTRY ServiceEntry; PSERVICE CurrentService; @@ -59,7 +59,7 @@
PSERVICE -ScmGetServiceEntryByDisplayName(LPWSTR lpDisplayName) +ScmGetServiceEntryByDisplayName(LPCWSTR lpDisplayName) { PLIST_ENTRY ServiceEntry; PSERVICE CurrentService; @@ -148,7 +148,7 @@
DWORD -ScmCreateNewServiceRecord(LPWSTR lpServiceName, +ScmCreateNewServiceRecord(LPCWSTR lpServiceName, PSERVICE *lpServiceRecord) { PSERVICE lpService = NULL; @@ -225,7 +225,7 @@
static DWORD -CreateServiceListEntry(LPWSTR lpServiceName, +CreateServiceListEntry(LPCWSTR lpServiceName, HKEY hServiceKey) { PSERVICE lpService = NULL;
Modified: trunk/reactos/base/system/services/groupdb.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/groupd... ============================================================================== --- trunk/reactos/base/system/services/groupdb.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/groupdb.c [iso-8859-1] Tue Jan 6 01:53:04 2009 @@ -25,7 +25,7 @@
DWORD ScmSetServiceGroup(PSERVICE lpService, - LPWSTR lpGroupName) + LPCWSTR lpGroupName) { PLIST_ENTRY GroupEntry; PSERVICE_GROUP lpGroup;
Modified: trunk/reactos/base/system/services/rpcserver.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcser... ============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Tue Jan 6 01:53:04 2009 @@ -1571,13 +1571,13 @@
DWORD ScmCanonDriverImagePath(DWORD dwStartType, - wchar_t *lpServiceName, + const wchar_t *lpServiceName, wchar_t **lpCanonName) { DWORD ServiceNameLen, Result; UNICODE_STRING NtServiceName; WCHAR *RelativeName; - WCHAR *SourceName = lpServiceName; + const WCHAR *SourceName = lpServiceName;
/* Calculate the length of the service's name */ ServiceNameLen = wcslen(lpServiceName); @@ -1703,18 +1703,18 @@ /* Function 12 */ DWORD RCreateServiceW( SC_RPC_HANDLE hSCManager, - LPWSTR lpServiceName, - LPWSTR lpDisplayName, + LPCWSTR lpServiceName, + LPCWSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, - LPWSTR lpBinaryPathName, - LPWSTR lpLoadOrderGroup, + LPCWSTR lpBinaryPathName, + LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPBYTE lpDependencies, DWORD dwDependSize, - LPWSTR lpServiceStartName, + LPCWSTR lpServiceStartName, LPBYTE lpPassword, DWORD dwPwSize, LPSC_RPC_HANDLE lpServiceHandle) @@ -2740,7 +2740,7 @@ /* Function 20 */ DWORD RGetServiceDisplayNameW( SC_RPC_HANDLE hSCManager, - LPWSTR lpServiceName, + LPCWSTR lpServiceName, LPWSTR lpDisplayName, DWORD *lpcchBuffer) { @@ -2773,7 +2773,10 @@ if (*lpcchBuffer == 0) { *lpcchBuffer = 1; - *lpDisplayName = '\0'; + if (lpDisplayName != NULL) + { + *lpDisplayName = '\0'; + } }
return ERROR_SERVICE_DOES_NOT_EXIST; @@ -2783,7 +2786,7 @@ { dwLength = wcslen(lpService->lpServiceName);
- if (lpServiceName != NULL && + if (lpDisplayName != NULL && *lpcchBuffer > dwLength) { wcscpy(lpDisplayName, lpService->lpServiceName); @@ -2811,7 +2814,7 @@ /* Function 21 */ DWORD RGetServiceKeyNameW( SC_RPC_HANDLE hSCManager, - LPWSTR lpDisplayName, + LPCWSTR lpDisplayName, LPWSTR lpServiceName, DWORD *lpcchBuffer) { @@ -2844,7 +2847,10 @@ if (*lpcchBuffer == 0) { *lpcchBuffer = 2; - *lpServiceName = '\0'; + if (lpServiceName != NULL) + { + *lpServiceName = '\0'; + } }
return ERROR_SERVICE_DOES_NOT_EXIST; @@ -3774,12 +3780,12 @@ /* Function 32 */ DWORD RGetServiceDisplayNameA( SC_RPC_HANDLE hSCManager, - LPSTR lpServiceName, + LPCSTR lpServiceName, LPSTR lpDisplayName, LPBOUNDED_DWORD_4K lpcchBuffer) { // PMANAGER_HANDLE hManager; - PSERVICE lpService; + PSERVICE lpService = NULL; DWORD dwLength; DWORD dwError; LPWSTR lpServiceNameW; @@ -3797,23 +3803,26 @@ // return ERROR_INVALID_HANDLE; // }
- dwLength = strlen(lpServiceName) + 1; - lpServiceNameW = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - dwLength * sizeof(WCHAR)); - if (!lpServiceNameW) - return ERROR_NOT_ENOUGH_MEMORY; - - MultiByteToWideChar(CP_ACP, - 0, - lpServiceName, - strlen(lpServiceName), - lpServiceNameW, - dwLength); - - lpService = ScmGetServiceEntryByName(lpServiceNameW); - - HeapFree(GetProcessHeap(), 0, lpServiceNameW); + if (lpServiceName != NULL) + { + dwLength = strlen(lpServiceName) + 1; + lpServiceNameW = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwLength * sizeof(WCHAR)); + if (!lpServiceNameW) + return ERROR_NOT_ENOUGH_MEMORY; + + MultiByteToWideChar(CP_ACP, + 0, + lpServiceName, + -1, + lpServiceNameW, + dwLength); + + lpService = ScmGetServiceEntryByName(lpServiceNameW); + + HeapFree(GetProcessHeap(), 0, lpServiceNameW); + }
if (lpService == NULL) { @@ -3824,7 +3833,10 @@ if (*lpcchBuffer == 0) { *lpcchBuffer = 1; - *lpDisplayName = '\0'; + if (lpDisplayName != NULL) + { + *lpDisplayName = '\0'; + } } return ERROR_SERVICE_DOES_NOT_EXIST; } @@ -3832,7 +3844,7 @@ if (!lpService->lpDisplayName) { dwLength = wcslen(lpService->lpServiceName); - if (lpServiceName != NULL && + if (lpDisplayName != NULL && *lpcchBuffer > dwLength) { WideCharToMultiByte(CP_ACP, @@ -3840,7 +3852,7 @@ lpService->lpServiceName, wcslen(lpService->lpServiceName), lpDisplayName, - *lpcchBuffer, + dwLength + 1, NULL, NULL); return ERROR_SUCCESS; @@ -3857,7 +3869,7 @@ lpService->lpDisplayName, wcslen(lpService->lpDisplayName), lpDisplayName, - *lpcchBuffer, + dwLength + 1, NULL, NULL); return ERROR_SUCCESS; @@ -3875,7 +3887,7 @@ /* Function 33 */ DWORD RGetServiceKeyNameA( SC_RPC_HANDLE hSCManager, - LPSTR lpDisplayName, + LPCSTR lpDisplayName, LPSTR lpServiceName, LPBOUNDED_DWORD_4K lpcchBuffer) { @@ -3900,7 +3912,7 @@ MultiByteToWideChar(CP_ACP, 0, lpDisplayName, - strlen(lpDisplayName), + -1, lpDisplayNameW, dwLength);
@@ -3917,21 +3929,24 @@ if (*lpcchBuffer == 0) { *lpcchBuffer = 1; - *lpServiceName = '\0'; + if (lpServiceName != NULL) + { + *lpServiceName = '\0'; + } }
return ERROR_SERVICE_DOES_NOT_EXIST; }
dwLength = wcslen(lpService->lpServiceName); - if (lpService != NULL && + if (lpServiceName != NULL && *lpcchBuffer > dwLength) { WideCharToMultiByte(CP_ACP, 0, lpService->lpServiceName, wcslen(lpService->lpServiceName), - lpServiceName, + lpServiceName + 1, dwLength, NULL, NULL);
Modified: trunk/reactos/base/system/services/services.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/servic... ============================================================================== --- trunk/reactos/base/system/services/services.h [iso-8859-1] (original) +++ trunk/reactos/base/system/services/services.h [iso-8859-1] Tue Jan 6 01:53:04 2009 @@ -77,7 +77,7 @@ REGSAM samDesired, PHKEY phKey);
-DWORD ScmCreateServiceKey(LPWSTR lpServiceName, +DWORD ScmCreateServiceKey(LPCWSTR lpServiceName, REGSAM samDesired, PHKEY phKey);
@@ -104,11 +104,11 @@ DWORD argc, LPWSTR *argv);
-PSERVICE ScmGetServiceEntryByName(LPWSTR lpServiceName); -PSERVICE ScmGetServiceEntryByDisplayName(LPWSTR lpDisplayName); +PSERVICE ScmGetServiceEntryByName(LPCWSTR lpServiceName); +PSERVICE ScmGetServiceEntryByDisplayName(LPCWSTR lpDisplayName); PSERVICE ScmGetServiceEntryByResumeCount(DWORD dwResumeCount); PSERVICE ScmGetServiceEntryByClientHandle(HANDLE Handle); -DWORD ScmCreateNewServiceRecord(LPWSTR lpServiceName, +DWORD ScmCreateNewServiceRecord(LPCWSTR lpServiceName, PSERVICE *lpServiceRecord); VOID ScmDeleteServiceRecord(PSERVICE lpService); DWORD ScmMarkServiceForDelete(PSERVICE pService); @@ -130,7 +130,7 @@
DWORD ScmCreateGroupList(VOID); DWORD ScmSetServiceGroup(PSERVICE lpService, - LPWSTR lpGroupName); + LPCWSTR lpGroupName);
/* rpcserver.c */
Modified: trunk/reactos/dll/win32/advapi32/service/scm.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service/... ============================================================================== --- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Tue Jan 6 01:53:04 2009 @@ -36,7 +36,7 @@ (UCHAR *)"\pipe\ntsvcs", NULL, (UCHAR **)&pszStringBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcStringBindingCompose returned 0x%x\n", status); return NULL; @@ -45,13 +45,13 @@ /* Set the binding handle that will be used to bind to the server. */ status = RpcBindingFromStringBindingA(pszStringBinding, &hBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcBindingFromStringBinding returned 0x%x\n", status); }
status = RpcStringFreeA(&pszStringBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcStringFree returned 0x%x\n", status); } @@ -69,7 +69,7 @@ TRACE("SVCCTL_HANDLEA_unbind() called\n");
status = RpcBindingFree(&hBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcBindingFree returned 0x%x\n", status); } @@ -91,7 +91,7 @@ L"\pipe\ntsvcs", NULL, &pszStringBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcStringBindingCompose returned 0x%x\n", status); return NULL; @@ -100,13 +100,13 @@ /* Set the binding handle that will be used to bind to the server. */ status = RpcBindingFromStringBindingW(pszStringBinding, &hBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcBindingFromStringBinding returned 0x%x\n", status); }
status = RpcStringFreeW(&pszStringBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcStringFree returned 0x%x\n", status); } @@ -124,7 +124,7 @@ TRACE("SVCCTL_HANDLEW_unbind() called\n");
status = RpcBindingFree(&hBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcBindingFree returned 0x%x\n", status); } @@ -146,7 +146,7 @@ L"\pipe\ntsvcs", NULL, &pszStringBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcStringBindingCompose returned 0x%x\n", status); return NULL; @@ -155,13 +155,13 @@ /* Set the binding handle that will be used to bind to the server. */ status = RpcBindingFromStringBindingW(pszStringBinding, &hBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcBindingFromStringBinding returned 0x%x\n", status); }
status = RpcStringFreeW(&pszStringBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcStringFree returned 0x%x\n", status); } @@ -179,7 +179,7 @@ TRACE("RPC_SERVICE_STATUS_HANDLE_unbind() called\n");
status = RpcBindingFree(&hBinding); - if (status) + if (status != RPC_S_OK) { ERR("RpcBindingFree returned 0x%x\n", status); } @@ -195,6 +195,8 @@ return ERROR_INVALID_HANDLE;
case RPC_X_NULL_REF_POINTER: + case RPC_X_ENUM_VALUE_OUT_OF_RANGE: + case RPC_X_BYTE_COUNT_TOO_SMALL: return ERROR_INVALID_PARAMETER;
case STATUS_ACCESS_VIOLATION: @@ -759,6 +761,8 @@ LPWSTR lpStr;
TRACE("CreateServiceW() called\n"); + TRACE("%p %S %S\n", hSCManager, + lpServiceName, lpDisplayName);
/* Calculate the Dependencies length*/ if (lpDependencies != NULL) @@ -781,18 +785,18 @@ { /* Call to services.exe using RPC */ dwError = RCreateServiceW((SC_RPC_HANDLE)hSCManager, - (LPWSTR)lpServiceName, - (LPWSTR)lpDisplayName, + lpServiceName, + lpDisplayName, dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl, - (LPWSTR)lpBinaryPathName, - (LPWSTR)lpLoadOrderGroup, + lpBinaryPathName, + lpLoadOrderGroup, lpdwTagId, (LPBYTE)lpDependencies, dwDependenciesLength, - (LPWSTR)lpServiceStartName, + lpServiceStartName, NULL, /* FIXME: lpPassword */ 0, /* FIXME: dwPasswordLength */ (SC_RPC_HANDLE *)&hService); @@ -1292,6 +1296,8 @@ DWORD dwError;
TRACE("GetServiceDisplayNameA() called\n"); + TRACE("%p %s %p %p\n", hSCManager, + debugstr_a(lpServiceName), lpDisplayName, lpcchBuffer);
if (!lpDisplayName) *lpcchBuffer = 0; @@ -1299,7 +1305,7 @@ _SEH2_TRY { dwError = RGetServiceDisplayNameA((SC_RPC_HANDLE)hSCManager, - (LPSTR)lpServiceName, + lpServiceName, lpDisplayName, lpcchBuffer); } @@ -1344,7 +1350,7 @@ _SEH2_TRY { dwError = RGetServiceDisplayNameW((SC_RPC_HANDLE)hSCManager, - (LPWSTR)lpServiceName, + lpServiceName, lpDisplayName, lpcchBuffer); } @@ -1386,7 +1392,7 @@ _SEH2_TRY { dwError = RGetServiceKeyNameA((SC_RPC_HANDLE)hSCManager, - (LPSTR)lpDisplayName, + lpDisplayName, lpServiceName, lpcchBuffer); } @@ -1428,7 +1434,7 @@ _SEH2_TRY { dwError = RGetServiceKeyNameW((SC_RPC_HANDLE)hSCManager, - (LPWSTR)lpDisplayName, + lpDisplayName, lpServiceName, lpcchBuffer); }
Modified: trunk/reactos/include/reactos/idl/svcctl.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/svcctl.... ============================================================================== --- trunk/reactos/include/reactos/idl/svcctl.idl [iso-8859-1] (original) +++ trunk/reactos/include/reactos/idl/svcctl.idl [iso-8859-1] Tue Jan 6 01:53:04 2009 @@ -380,6 +380,307 @@ /* Function 12 */ DWORD RCreateServiceW( [in] SC_RPC_HANDLE hSCManager, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR lpServiceName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR lpDisplayName, + [in] DWORD dwDesiredAccess, + [in] DWORD dwServiceType, + [in] DWORD dwStartType, + [in] DWORD dwErrorControl, + [in, string, range(0, SC_MAX_PATH_LENGTH)] LPCWSTR lpBinaryPathName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR lpLoadOrderGroup, + [in, out, unique] LPDWORD lpdwTagId, + [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies, + [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize, + [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPCWSTR lpServiceStartName, + [in, unique, size_is(dwPwSize)] LPBYTE lpPassword, + [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, + [out] LPSC_RPC_HANDLE lpServiceHandle); + + /* Function 13 */ + DWORD REnumDependentServicesW( + [in] SC_RPC_HANDLE hService, + [in] DWORD dwServiceState, + [out, size_is(cbBufSize)] LPBYTE lpServices, + [in, range(0, 1024*256)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, + [out] LPBOUNDED_DWORD_256K lpServicesReturned); + + /* Function 14 */ + DWORD REnumServicesStatusW( + [in] SC_RPC_HANDLE hSCManager, + [in] DWORD dwServiceType, + [in] DWORD dwServiceState, + [out, size_is(dwBufSize)] LPBYTE lpBuffer, + [in, range(0, 1024*256)] DWORD dwBufSize, + [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, + [out] LPBOUNDED_DWORD_256K lpServicesReturned, + [in, out, unique] LPBOUNDED_DWORD_256K lpResumeHandle); + + /* Function 15 */ + DWORD ROpenSCManagerW( + [in, string, unique, range(0, SC_MAX_COMPUTER_NAME_LENGTH)] SVCCTL_HANDLEW lpMachineName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDatabaseName, + [in] DWORD dwDesiredAccess, + [out] LPSC_RPC_HANDLE lpScHandle); + + /* Function 16 */ + DWORD ROpenServiceW( + [in] SC_RPC_HANDLE hSCManager, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName, + [in] DWORD dwDesiredAccess, + [out] LPSC_RPC_HANDLE lpServiceHandle); + + /* Function 17 */ + DWORD RQueryServiceConfigW( + [in] SC_RPC_HANDLE hService, + [out, unique, size_is(cbBufSize)] LPBYTE lpServiceConfig, + /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGW lpServiceConfig, */ + [in, range(0, 1024*8)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); + + /* Function 18 */ + DWORD RQueryServiceLockStatusW( + [in] SC_RPC_HANDLE hSCManager, + [out] LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus, + [in, range(0, 1024*4)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_4K pcbBytesNeeded); + + /* Function 19 */ + DWORD RStartServiceW( + [in] SC_RPC_HANDLE hService, + [in, range(0, SC_MAX_ARGUMENTS)] DWORD argc, + [in, unique, size_is(argc)] LPSTRING_PTRSW argv); + + /* Function 20 */ + DWORD RGetServiceDisplayNameW( + [in] SC_RPC_HANDLE hSCManager, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR lpServiceName, + [out, string, range(1, 4*1024+1), size_is(*lpcchBuffer + 1)] LPWSTR lpDisplayName, + [in, out] DWORD* lpcchBuffer); + + /* Function 21 */ + DWORD RGetServiceKeyNameW( + [in] SC_RPC_HANDLE hSCManager, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR lpDisplayName, + [out, string, range(1, 4*1024+1), size_is(*lpcchBuffer + 1)] LPWSTR lpServiceName, + [in, out] DWORD* lpcchBuffer); + + /* Function 22 */ + DWORD RI_ScSetServiceBitsA( + [in] RPC_SERVICE_STATUS_HANDLE hServiceStatus, + [in] DWORD dwServiceBits, + [in] BOOL bSetBitsOn, + [in] BOOL bUpdateImmediately, + [in, string, unique] LPSTR lpString); + + /* Function 23 */ + DWORD RChangeServiceConfigA( + [in] SC_RPC_HANDLE hService, + [in] DWORD dwServiceType, + [in] DWORD dwStartType, + [in] DWORD dwErrorControl, + [in, string, unique, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup, + [in, out, unique] LPDWORD lpdwTagId, + [in, unique, size_is(dwDependSize)] LPSTR lpDependencies, + [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize, + [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName, + [in, unique, size_is(dwPwSize)] LPBYTE lpPassword, + [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName); + + /* Function 24 */ + DWORD RCreateServiceA( + [in] SC_RPC_HANDLE hSCManager, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName, + [in] DWORD dwDesiredAccess, + [in] DWORD dwServiceType, + [in] DWORD dwStartType, + [in] DWORD dwErrorControl, + [in, string, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup, + [in, out, unique] LPDWORD lpdwTagId, + [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies, + [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize, + [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName, + [in, unique, size_is(dwPwSize)] LPBYTE lpPassword, + [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, + [out] LPSC_RPC_HANDLE lpServiceHandle); + + /* Function 25 */ + DWORD REnumDependentServicesA( + [in] SC_RPC_HANDLE hService, + [in] DWORD dwServiceState, + [out, size_is(cbBufSize)] LPBYTE lpServices, + [in, range(0, 1024*256)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, + [out] LPBOUNDED_DWORD_256K lpServicesReturned); + + /* Function 26 */ + DWORD REnumServicesStatusA( + [in] SC_RPC_HANDLE hSCManager, + [in] DWORD dwServiceType, + [in] DWORD dwServiceState, + [out, size_is(dwBufSize)] LPBYTE lpBuffer, + [in, range(0, 1024*256)] DWORD dwBufSize, + [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, + [out] LPBOUNDED_DWORD_256K lpServicesReturned, + [in, out, unique] LPBOUNDED_DWORD_256K lpResumeHandle); + + /* Function 27 */ + DWORD ROpenSCManagerA( + [in, string, unique, range(0, SC_MAX_COMPUTER_NAME_LENGTH)] SVCCTL_HANDLEA lpMachineName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDatabaseName, + [in] DWORD dwDesiredAccess, + [out] LPSC_RPC_HANDLE lpScHandle); + + /* Function 28 */ + DWORD ROpenServiceA( + [in] SC_RPC_HANDLE hSCManager, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName, + [in] DWORD dwDesiredAccess, + [out] LPSC_RPC_HANDLE lpServiceHandle); + + /* Function 29 */ + DWORD RQueryServiceConfigA( + [in] SC_RPC_HANDLE hService, + [out, unique, size_is(cbBufSize)] LPBYTE lpServiceConfig, + /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGA lpServiceConfig, */ + [in, range(0, 1024*8)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); + + /* Function 30 */ + DWORD RQueryServiceLockStatusA( + [in] SC_RPC_HANDLE hSCManager, + [out] LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus, + [in, range(0, 1024*4)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_4K pcbBytesNeeded); + + /* Function 31 */ + DWORD RStartServiceA( + [in] SC_RPC_HANDLE hService, + [in, range(0, SC_MAX_ARGUMENTS)] DWORD argc, + [in, unique, size_is(argc)] LPSTRING_PTRSA argv); + + /* Function 32 */ + DWORD RGetServiceDisplayNameA( + [in] SC_RPC_HANDLE hSCManager, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPCSTR lpServiceName, + [out, string, size_is(*lpcchBuffer)] LPSTR lpDisplayName, + [in, out] LPBOUNDED_DWORD_4K lpcchBuffer); + + /* Function 33 */ + DWORD RGetServiceKeyNameA( + [in] SC_RPC_HANDLE hSCManager, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPCSTR lpDisplayName, + [out, string, size_is(*lpcchBuffer)] LPSTR lpKeyName, + [in, out] LPBOUNDED_DWORD_4K lpcchBuffer); + + /* Function 34 */ + DWORD RI_ScGetCurrentGroupStateW( + [in] SC_RPC_HANDLE hSCManager, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpLoadOrderGroup, + [out] LPDWORD lpState); + + /* Function 35 */ + DWORD REnumServiceGroupW( + [in] SC_RPC_HANDLE hSCManager, + [in] DWORD dwServiceType, + [in] DWORD dwServiceState, + [out, size_is(cbBufSize)] LPBYTE lpBuffer, + [in, range(0, 1024*256)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, + [out] LPBOUNDED_DWORD_256K lpServicesReturned, + [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR pszGroupName); + + /* Function 36 */ + DWORD RChangeServiceConfig2A( + [in] SC_RPC_HANDLE hService, + [in] SC_RPC_CONFIG_INFOA Info); + + /* Function 37 */ + DWORD RChangeServiceConfig2W( + [in] SC_RPC_HANDLE hService, + [in] SC_RPC_CONFIG_INFOW Info); + + /* Function 38 */ + DWORD RQueryServiceConfig2A( + [in] SC_RPC_HANDLE hService, + [in] DWORD dwInfoLevel, + [out, size_is(cbBufSize)] LPBYTE lpBuffer, + [in, range(0, 1024*8)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); + + /* Function 39 */ + DWORD RQueryServiceConfig2W( + [in] SC_RPC_HANDLE hService, + [in] DWORD dwInfoLevel, + [out, size_is(cbBufSize)] LPBYTE lpBuffer, + [in, range(0, 1024*8)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); + + /* Function 40 */ + DWORD RQueryServiceStatusEx( + [in] SC_RPC_HANDLE hService, + [in] SC_STATUS_TYPE InfoLevel, + [out, size_is(cbBufSize)] LPBYTE lpBuffer, + [in, range(0, 1024*8)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); + + /* Function 41 */ + DWORD REnumServicesStatusExA( + [in] SC_RPC_HANDLE hSCManager, + [in] SC_ENUM_TYPE InfoLevel, + [in] DWORD dwServiceType, + [in] DWORD dwServiceState, + [out, size_is(cbBufSize)] LPBYTE lpBuffer, + [in, range(0, 1024 * 256)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, + [out] LPBOUNDED_DWORD_256K lpServicesReturned, + [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCSTR pszGroupName); + + /* Function 42 */ + DWORD REnumServicesStatusExW( + [in] SC_RPC_HANDLE hSCManager, + [in] SC_ENUM_TYPE InfoLevel, + [in] DWORD dwServiceType, + [in] DWORD dwServiceState, + [out, size_is(cbBufSize)] LPBYTE lpBuffer, + [in, range(0, 1024 * 256)] DWORD cbBufSize, + [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, + [out] LPBOUNDED_DWORD_256K lpServicesReturned, + [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR pszGroupName); + + /* Function 43 */ + DWORD RSendTSMessage( + [in] handle_t BindingHandle); /* FIXME */ + + /* Function 44 */ + DWORD RCreateServiceWOW64A( + [in] handle_t BindingHandle, + [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName, + [in] DWORD dwDesiredAccess, + [in] DWORD dwServiceType, + [in] DWORD dwStartType, + [in] DWORD dwErrorControl, + [in, string, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName, + [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup, + [in, out, unique] LPDWORD lpdwTagId, + [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies, + [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize, + [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName, + [in, unique, size_is(dwPwSize)] LPBYTE lpPassword, + [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, + [out] LPSC_RPC_HANDLE lpServiceHandle); + + /* Function 45 */ + DWORD RCreateServiceWOW64W( + [in] handle_t BindingHandle, [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName, [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDisplayName, [in] DWORD dwDesiredAccess, @@ -396,307 +697,6 @@ [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, [out] LPSC_RPC_HANDLE lpServiceHandle);
- /* Function 13 */ - DWORD REnumDependentServicesW( - [in] SC_RPC_HANDLE hService, - [in] DWORD dwServiceState, - [out, size_is(cbBufSize)] LPBYTE lpServices, - [in, range(0, 1024*256)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, - [out] LPBOUNDED_DWORD_256K lpServicesReturned); - - /* Function 14 */ - DWORD REnumServicesStatusW( - [in] SC_RPC_HANDLE hSCManager, - [in] DWORD dwServiceType, - [in] DWORD dwServiceState, - [out, size_is(dwBufSize)] LPBYTE lpBuffer, - [in, range(0, 1024*256)] DWORD dwBufSize, - [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, - [out] LPBOUNDED_DWORD_256K lpServicesReturned, - [in, out, unique] LPBOUNDED_DWORD_256K lpResumeHandle); - - /* Function 15 */ - DWORD ROpenSCManagerW( - [in, string, unique, range(0, SC_MAX_COMPUTER_NAME_LENGTH)] SVCCTL_HANDLEW lpMachineName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDatabaseName, - [in] DWORD dwDesiredAccess, - [out] LPSC_RPC_HANDLE lpScHandle); - - /* Function 16 */ - DWORD ROpenServiceW( - [in] SC_RPC_HANDLE hSCManager, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName, - [in] DWORD dwDesiredAccess, - [out] LPSC_RPC_HANDLE lpServiceHandle); - - /* Function 17 */ - DWORD RQueryServiceConfigW( - [in] SC_RPC_HANDLE hService, - [out, unique, size_is(cbBufSize)] LPBYTE lpServiceConfig, - /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGW lpServiceConfig, */ - [in, range(0, 1024*8)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); - - /* Function 18 */ - DWORD RQueryServiceLockStatusW( - [in] SC_RPC_HANDLE hSCManager, - [out] LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus, - [in, range(0, 1024*4)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_4K pcbBytesNeeded); - - /* Function 19 */ - DWORD RStartServiceW( - [in] SC_RPC_HANDLE hService, - [in, range(0, SC_MAX_ARGUMENTS)] DWORD argc, - [in, unique, size_is(argc)] LPSTRING_PTRSW argv); - - /* Function 20 */ - DWORD RGetServiceDisplayNameW( - [in] SC_RPC_HANDLE hSCManager, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName, - [out, string, range(1, 4*1024+1), size_is(*lpcchBuffer + 1)] LPWSTR lpDisplayName, - [in, out] DWORD* lpcchBuffer); - - /* Function 21 */ - DWORD RGetServiceKeyNameW( - [in] SC_RPC_HANDLE hSCManager, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDisplayName, - [out, string, range(1, 4*1024+1), size_is(*lpcchBuffer + 1)] LPWSTR lpServiceName, - [in, out] DWORD* lpcchBuffer); - - /* Function 22 */ - DWORD RI_ScSetServiceBitsA( - [in] RPC_SERVICE_STATUS_HANDLE hServiceStatus, - [in] DWORD dwServiceBits, - [in] BOOL bSetBitsOn, - [in] BOOL bUpdateImmediately, - [in, string, unique] LPSTR lpString); - - /* Function 23 */ - DWORD RChangeServiceConfigA( - [in] SC_RPC_HANDLE hService, - [in] DWORD dwServiceType, - [in] DWORD dwStartType, - [in] DWORD dwErrorControl, - [in, string, unique, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup, - [in, out, unique] LPDWORD lpdwTagId, - [in, unique, size_is(dwDependSize)] LPSTR lpDependencies, - [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize, - [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName, - [in, unique, size_is(dwPwSize)] LPBYTE lpPassword, - [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName); - - /* Function 24 */ - DWORD RCreateServiceA( - [in] SC_RPC_HANDLE hSCManager, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName, - [in] DWORD dwDesiredAccess, - [in] DWORD dwServiceType, - [in] DWORD dwStartType, - [in] DWORD dwErrorControl, - [in, string, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup, - [in, out, unique] LPDWORD lpdwTagId, - [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies, - [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize, - [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName, - [in, unique, size_is(dwPwSize)] LPBYTE lpPassword, - [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, - [out] LPSC_RPC_HANDLE lpServiceHandle); - - /* Function 25 */ - DWORD REnumDependentServicesA( - [in] SC_RPC_HANDLE hService, - [in] DWORD dwServiceState, - [out, size_is(cbBufSize)] LPBYTE lpServices, - [in, range(0, 1024*256)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, - [out] LPBOUNDED_DWORD_256K lpServicesReturned); - - /* Function 26 */ - DWORD REnumServicesStatusA( - [in] SC_RPC_HANDLE hSCManager, - [in] DWORD dwServiceType, - [in] DWORD dwServiceState, - [out, size_is(dwBufSize)] LPBYTE lpBuffer, - [in, range(0, 1024*256)] DWORD dwBufSize, - [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, - [out] LPBOUNDED_DWORD_256K lpServicesReturned, - [in, out, unique] LPBOUNDED_DWORD_256K lpResumeHandle); - - /* Function 27 */ - DWORD ROpenSCManagerA( - [in, string, unique, range(0, SC_MAX_COMPUTER_NAME_LENGTH)] SVCCTL_HANDLEA lpMachineName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDatabaseName, - [in] DWORD dwDesiredAccess, - [out] LPSC_RPC_HANDLE lpScHandle); - - /* Function 28 */ - DWORD ROpenServiceA( - [in] SC_RPC_HANDLE hSCManager, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName, - [in] DWORD dwDesiredAccess, - [out] LPSC_RPC_HANDLE lpServiceHandle); - - /* Function 29 */ - DWORD RQueryServiceConfigA( - [in] SC_RPC_HANDLE hService, - [out, unique, size_is(cbBufSize)] LPBYTE lpServiceConfig, - /* FIXME: should be [out] LPQUERY_SERVICE_CONFIGA lpServiceConfig, */ - [in, range(0, 1024*8)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); - - /* Function 30 */ - DWORD RQueryServiceLockStatusA( - [in] SC_RPC_HANDLE hSCManager, - [out] LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus, - [in, range(0, 1024*4)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_4K pcbBytesNeeded); - - /* Function 31 */ - DWORD RStartServiceA( - [in] SC_RPC_HANDLE hService, - [in, range(0, SC_MAX_ARGUMENTS)] DWORD argc, - [in, unique, size_is(argc)] LPSTRING_PTRSA argv); - - /* Function 32 */ - DWORD RGetServiceDisplayNameA( - [in] SC_RPC_HANDLE hSCManager, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName, - [out, string, size_is(*lpcchBuffer)] LPSTR lpDisplayName, - [in, out] LPBOUNDED_DWORD_4K lpcchBuffer); - - /* Function 33 */ - DWORD RGetServiceKeyNameA( - [in] SC_RPC_HANDLE hSCManager, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName, - [out, string, size_is(*lpcchBuffer)] LPSTR lpKeyName, - [in, out] LPBOUNDED_DWORD_4K lpcchBuffer); - - /* Function 34 */ - DWORD RI_ScGetCurrentGroupStateW( - [in] SC_RPC_HANDLE hSCManager, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpLoadOrderGroup, - [out] LPDWORD lpState); - - /* Function 35 */ - DWORD REnumServiceGroupW( - [in] SC_RPC_HANDLE hSCManager, - [in] DWORD dwServiceType, - [in] DWORD dwServiceState, - [out, size_is(cbBufSize)] LPBYTE lpBuffer, - [in, range(0, 1024*256)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, - [out] LPBOUNDED_DWORD_256K lpServicesReturned, - [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR pszGroupName); - - /* Function 36 */ - DWORD RChangeServiceConfig2A( - [in] SC_RPC_HANDLE hService, - [in] SC_RPC_CONFIG_INFOA Info); - - /* Function 37 */ - DWORD RChangeServiceConfig2W( - [in] SC_RPC_HANDLE hService, - [in] SC_RPC_CONFIG_INFOW Info); - - /* Function 38 */ - DWORD RQueryServiceConfig2A( - [in] SC_RPC_HANDLE hService, - [in] DWORD dwInfoLevel, - [out, size_is(cbBufSize)] LPBYTE lpBuffer, - [in, range(0, 1024*8)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); - - /* Function 39 */ - DWORD RQueryServiceConfig2W( - [in] SC_RPC_HANDLE hService, - [in] DWORD dwInfoLevel, - [out, size_is(cbBufSize)] LPBYTE lpBuffer, - [in, range(0, 1024*8)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); - - /* Function 40 */ - DWORD RQueryServiceStatusEx( - [in] SC_RPC_HANDLE hService, - [in] SC_STATUS_TYPE InfoLevel, - [out, size_is(cbBufSize)] LPBYTE lpBuffer, - [in, range(0, 1024*8)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_8K pcbBytesNeeded); - - /* Function 41 */ - DWORD REnumServicesStatusExA( - [in] SC_RPC_HANDLE hSCManager, - [in] SC_ENUM_TYPE InfoLevel, - [in] DWORD dwServiceType, - [in] DWORD dwServiceState, - [out, size_is(cbBufSize)] LPBYTE lpBuffer, - [in, range(0, 1024 * 256)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, - [out] LPBOUNDED_DWORD_256K lpServicesReturned, - [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCSTR pszGroupName); - - /* Function 42 */ - DWORD REnumServicesStatusExW( - [in] SC_RPC_HANDLE hSCManager, - [in] SC_ENUM_TYPE InfoLevel, - [in] DWORD dwServiceType, - [in] DWORD dwServiceState, - [out, size_is(cbBufSize)] LPBYTE lpBuffer, - [in, range(0, 1024 * 256)] DWORD cbBufSize, - [out] LPBOUNDED_DWORD_256K pcbBytesNeeded, - [out] LPBOUNDED_DWORD_256K lpServicesReturned, - [in, out, unique] LPBOUNDED_DWORD_256K lpResumeIndex, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPCWSTR pszGroupName); - - /* Function 43 */ - DWORD RSendTSMessage( - [in] handle_t BindingHandle); /* FIXME */ - - /* Function 44 */ - DWORD RCreateServiceWOW64A( - [in] handle_t BindingHandle, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName, - [in] DWORD dwDesiredAccess, - [in] DWORD dwServiceType, - [in] DWORD dwStartType, - [in] DWORD dwErrorControl, - [in, string, range(0, SC_MAX_PATH_LENGTH)] LPSTR lpBinaryPathName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpLoadOrderGroup, - [in, out, unique] LPDWORD lpdwTagId, - [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies, - [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize, - [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPSTR lpServiceStartName, - [in, unique, size_is(dwPwSize)] LPBYTE lpPassword, - [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, - [out] LPSC_RPC_HANDLE lpServiceHandle); - - /* Function 45 */ - DWORD RCreateServiceWOW64W( - [in] handle_t BindingHandle, - [in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDisplayName, - [in] DWORD dwDesiredAccess, - [in] DWORD dwServiceType, - [in] DWORD dwStartType, - [in] DWORD dwErrorControl, - [in, string, range(0, SC_MAX_PATH_LENGTH)] LPWSTR lpBinaryPathName, - [in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpLoadOrderGroup, - [in, out, unique] LPDWORD lpdwTagId, - [in, unique, size_is(dwDependSize)] LPBYTE lpDependencies, - [in, range(0, SC_MAX_DEPEND_SIZE)] DWORD dwDependSize, - [in, string, unique, range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] LPWSTR lpServiceStartName, - [in, unique, size_is(dwPwSize)] LPBYTE lpPassword, - [in, range(0, SC_MAX_PWD_SIZE)] DWORD dwPwSize, - [out] LPSC_RPC_HANDLE lpServiceHandle); - /* Function 46 */ DWORD RQueryServiceTagInfo( [in] handle_t BindingHandle); /* FIXME */