Author: ekohl
Date: Sun Oct 26 10:11:28 2008
New Revision: 36991
URL:
http://svn.reactos.org/svn/reactos?rev=36991&view=rev
Log:
Service Manager:
- Get rid of the globally created binding handle and use the WIDL-generated custom binding
handles and context handles instead.
The other RPC interfaces will be converted as soon as possible.
Modified:
trunk/reactos/base/system/services/rpcserver.c
trunk/reactos/dll/win32/advapi32/service/scm.c
trunk/reactos/dll/win32/advapi32/service/sctrl.c
trunk/reactos/include/reactos/idl/svcctl.idl
Modified: trunk/reactos/base/system/services/rpcserver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
==============================================================================
--- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Sun Oct 26 10:11:28 2008
@@ -400,7 +400,6 @@
/* Function 0 */
DWORD RCloseServiceHandle(
- handle_t BindingHandle,
LPSC_RPC_HANDLE hSCObject)
{
PMANAGER_HANDLE hManager;
@@ -526,7 +525,6 @@
/* Function 1 */
DWORD RControlService(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwControl,
LPSERVICE_STATUS lpServiceStatus)
@@ -657,7 +655,6 @@
/* Function 2 */
DWORD RDeleteService(
- handle_t BindingHandle,
SC_RPC_HANDLE hService)
{
PSERVICE_HANDLE hSvc;
@@ -707,7 +704,6 @@
/* Function 3 */
DWORD RLockServiceDatabase(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPSC_RPC_LOCK lpLock)
{
@@ -736,7 +732,6 @@
/* Function 4 */
DWORD RQueryServiceObjectSecurity(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
SECURITY_INFORMATION dwSecurityInformation,
LPBYTE lpSecurityDescriptor,
@@ -820,7 +815,6 @@
/* Function 5 */
DWORD RSetServiceObjectSecurity(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwSecurityInformation,
LPBYTE lpSecurityDescriptor,
@@ -940,7 +934,6 @@
/* Function 6 */
DWORD RQueryServiceStatus(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
LPSERVICE_STATUS lpServiceStatus)
{
@@ -1004,7 +997,6 @@
/* Function 7 */
DWORD RSetServiceStatus(
-// handle_t BindingHandle,
RPC_SERVICE_STATUS_HANDLE hServiceStatus,
LPSERVICE_STATUS lpServiceStatus)
{
@@ -1070,7 +1062,6 @@
/* Function 8 */
DWORD RUnlockServiceDatabase(
- handle_t BindingHandle,
LPSC_RPC_LOCK Lock)
{
UNIMPLEMENTED;
@@ -1080,7 +1071,6 @@
/* Function 9 */
DWORD RNotifyBootConfigStatus(
- handle_t BindingHandle,
SVCCTL_HANDLEW lpMachineName,
DWORD BootAcceptable)
{
@@ -1091,7 +1081,6 @@
/* Function 10 */
DWORD RI_ScSetServiceBitsW(
-// handle_t BindingHandle,
RPC_SERVICE_STATUS_HANDLE hServiceStatus,
DWORD dwServiceBits,
int bSetBitsOn,
@@ -1105,7 +1094,6 @@
/* Function 11 */
DWORD RChangeServiceConfigW(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwServiceType,
DWORD dwStartType,
@@ -1715,7 +1703,6 @@
/* Function 12 */
DWORD RCreateServiceW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPWSTR lpServiceName,
LPWSTR lpDisplayName,
@@ -2051,7 +2038,6 @@
/* Function 13 */
DWORD REnumDependentServicesW(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwServiceState,
LPBYTE lpServices,
@@ -2181,7 +2167,6 @@
/* Function 14 */
DWORD REnumServicesStatusW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
DWORD dwServiceType,
DWORD dwServiceState,
@@ -2388,7 +2373,6 @@
/* Function 15 */
DWORD ROpenSCManagerW(
-// handle_t BindingHandle,
LPWSTR lpMachineName,
LPWSTR lpDatabaseName,
DWORD dwDesiredAccess,
@@ -2439,7 +2423,6 @@
/* Function 16 */
DWORD ROpenServiceW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPWSTR lpServiceName,
DWORD dwDesiredAccess,
@@ -2515,7 +2498,6 @@
/* Function 17 */
DWORD RQueryServiceConfigW(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
LPBYTE lpBuf, //LPQUERY_SERVICE_CONFIGW lpServiceConfig,
DWORD cbBufSize,
@@ -2692,7 +2674,6 @@
/* Function 18 */
DWORD RQueryServiceLockStatusW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus,
DWORD cbBufSize,
@@ -2705,7 +2686,6 @@
/* Function 19 */
DWORD RStartServiceW(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD argc,
LPSTRING_PTRSW argv)
@@ -2760,7 +2740,6 @@
/* Function 20 */
DWORD RGetServiceDisplayNameW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPWSTR lpServiceName,
LPWSTR lpDisplayName,
@@ -2832,7 +2811,6 @@
/* Function 21 */
DWORD RGetServiceKeyNameW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPWSTR lpDisplayName,
LPWSTR lpServiceName,
@@ -2893,7 +2871,6 @@
/* Function 22 */
DWORD RI_ScSetServiceBitsA(
-// handle_t BindingHandle,
RPC_SERVICE_STATUS_HANDLE hServiceStatus,
DWORD dwServiceBits,
int bSetBitsOn,
@@ -2907,7 +2884,6 @@
/* Function 23 */
DWORD RChangeServiceConfigA(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwServiceType,
DWORD dwStartType,
@@ -3192,7 +3168,6 @@
/* Function 24 */
DWORD RCreateServiceA(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPSTR lpServiceName,
LPSTR lpDisplayName,
@@ -3217,7 +3192,6 @@
/* Function 25 */
DWORD REnumDependentServicesA(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwServiceState,
LPBYTE lpServices,
@@ -3365,7 +3339,6 @@
/* Function 26 */
DWORD REnumServicesStatusA(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
DWORD dwServiceType,
DWORD dwServiceState,
@@ -3394,7 +3367,7 @@
}
}
- dwError = REnumServicesStatusW(BindingHandle,
+ dwError = REnumServicesStatusW(//BindingHandle,
hSCManager,
dwServiceType,
dwServiceState,
@@ -3462,7 +3435,6 @@
/* Function 27 */
DWORD ROpenSCManagerA(
-// handle_t BindingHandle,
LPSTR lpMachineName,
LPSTR lpDatabaseName,
DWORD dwDesiredAccess,
@@ -3500,7 +3472,6 @@
/* Function 28 */
DWORD ROpenServiceA(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPSTR lpServiceName,
DWORD dwDesiredAccess,
@@ -3515,7 +3486,7 @@
RtlCreateUnicodeStringFromAsciiz(&ServiceName,
lpServiceName);
- dwError = ROpenServiceW(BindingHandle,
+ dwError = ROpenServiceW(//BindingHandle,
hSCManager,
lpServiceName ? ServiceName.Buffer : NULL,
dwDesiredAccess,
@@ -3530,7 +3501,6 @@
/* Function 29 */
DWORD RQueryServiceConfigA(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
LPBYTE lpBuf, //LPQUERY_SERVICE_CONFIGA lpServiceConfig,
DWORD cbBufSize,
@@ -3739,7 +3709,6 @@
/* Function 30 */
DWORD RQueryServiceLockStatusA(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus,
DWORD cbBufSize,
@@ -3752,7 +3721,6 @@
/* Function 31 */
DWORD RStartServiceA(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD argc,
LPSTRING_PTRSA argv)
@@ -3806,7 +3774,6 @@
/* Function 32 */
DWORD RGetServiceDisplayNameA(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPSTR lpServiceName,
LPSTR lpDisplayName,
@@ -3908,7 +3875,6 @@
/* Function 33 */
DWORD RGetServiceKeyNameA(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPSTR lpDisplayName,
LPSTR lpServiceName,
@@ -3983,7 +3949,6 @@
/* Function 34 */
DWORD RI_ScGetCurrentGroupStateW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
LPWSTR lpLoadOrderGroup,
LPDWORD lpState)
@@ -3995,7 +3960,6 @@
/* Function 35 */
DWORD REnumServiceGroupW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
DWORD dwServiceType,
DWORD dwServiceState,
@@ -4013,7 +3977,6 @@
/* Function 36 */
DWORD RChangeServiceConfig2A(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
SC_RPC_CONFIG_INFOA Info)
{
@@ -4024,7 +3987,6 @@
/* Function 37 */
DWORD RChangeServiceConfig2W(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
SC_RPC_CONFIG_INFOW Info)
{
@@ -4117,7 +4079,6 @@
/* Function 38 */
DWORD RQueryServiceConfig2A(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwInfoLevel,
LPBYTE lpBuffer,
@@ -4225,7 +4186,6 @@
/* Function 39 */
DWORD RQueryServiceConfig2W(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwInfoLevel,
LPBYTE lpBuffer,
@@ -4324,7 +4284,6 @@
/* Function 40 */
DWORD RQueryServiceStatusEx(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
SC_STATUS_TYPE InfoLevel,
LPBYTE lpBuffer,
@@ -4385,7 +4344,6 @@
/* Function 41 */
DWORD REnumServicesStatusExA(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
SC_ENUM_TYPE InfoLevel,
DWORD dwServiceType,
@@ -4433,8 +4391,7 @@
}
}
- dwError = REnumServicesStatusExW(BindingHandle,
- hSCManager,
+ dwError = REnumServicesStatusExW(hSCManager,
InfoLevel,
dwServiceType,
dwServiceState,
@@ -4507,7 +4464,6 @@
/* Function 42 */
DWORD REnumServicesStatusExW(
- handle_t BindingHandle,
SC_RPC_HANDLE hSCManager,
SC_ENUM_TYPE InfoLevel,
DWORD dwServiceType,
@@ -4782,7 +4738,7 @@
/* Function 43 */
DWORD RSendTSMessage(
- handle_t BindingHandle)
+ handle_t BindingHandle) /* FIXME */
{
UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
@@ -4839,7 +4795,7 @@
/* Function 46 */
DWORD RQueryServiceTagInfo(
- handle_t BindingHandle)
+ handle_t BindingHandle) /* FIXME */
{
UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
@@ -4848,7 +4804,6 @@
/* Function 47 */
DWORD RNotifyServiceStatusChange(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
SC_RPC_NOTIFY_PARAMS NotifyParams,
GUID *pClientProcessGuid,
@@ -4863,7 +4818,6 @@
/* Function 48 */
DWORD RGetNotifyResults(
- handle_t BindingHandle,
SC_NOTIFY_RPC_HANDLE hNotify,
PSC_RPC_NOTIFY_PARAMS_LIST *ppNotifyParams)
{
@@ -4874,7 +4828,6 @@
/* Function 49 */
DWORD RCloseNotifyHandle(
- handle_t BindingHandle,
LPSC_NOTIFY_RPC_HANDLE phNotify,
PBOOL pfApcFired)
{
@@ -4885,7 +4838,6 @@
/* Function 50 */
DWORD RControlServiceExA(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwControl,
DWORD dwInfoLevel)
@@ -4897,7 +4849,6 @@
/* Function 51 */
DWORD RControlServiceExW(
- handle_t BindingHandle,
SC_RPC_HANDLE hService,
DWORD dwControl,
DWORD dwInfoLevel)
@@ -4909,7 +4860,7 @@
/* Function 52 */
DWORD RSendPnPMessage(
- handle_t BindingHandle)
+ handle_t BindingHandle) /* FIXME */
{
UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
@@ -4918,7 +4869,7 @@
/* Function 53 */
DWORD RValidatePnPService(
- handle_t BindingHandle)
+ handle_t BindingHandle) /* FIXME */
{
UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
@@ -4927,7 +4878,7 @@
/* Function 54 */
DWORD ROpenServiceStatusHandle(
- handle_t BindingHandle)
+ handle_t BindingHandle) /* FIXME */
{
UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
@@ -4936,7 +4887,7 @@
/* Function 55 */
DWORD RFunction55(
- handle_t BindingHandle)
+ handle_t BindingHandle) /* FIXME */
{
UNIMPLEMENTED;
return ERROR_CALL_NOT_IMPLEMENTED;
@@ -4969,5 +4920,4 @@
{
}
-
/* EOF */
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] Sun Oct 26 10:11:28 2008
@@ -21,16 +21,126 @@
/* FUNCTIONS *****************************************************************/
-handle_t BindingHandle = NULL;
-
-VOID
-HandleBind(VOID)
-{
+handle_t __RPC_USER
+SVCCTL_HANDLEA_bind(SVCCTL_HANDLEA szMachineName)
+{
+ handle_t hBinding = NULL;
+ UCHAR *pszStringBinding;
+ RPC_STATUS status;
+
+ ERR("SVCCTL_HANDLEA_bind() called\n");
+
+ status = RpcStringBindingComposeA((UCHAR *)szMachineName,
+ (UCHAR *)"ncacn_np",
+ NULL,
+ (UCHAR *)"\\pipe\\ntsvcs",
+ NULL,
+ (UCHAR **)&pszStringBinding);
+ if (status)
+ {
+ ERR("RpcStringBindingCompose returned 0x%x\n", status);
+ return NULL;
+ }
+
+ /* Set the binding handle that will be used to bind to the server. */
+ status = RpcBindingFromStringBindingA(pszStringBinding,
+ &hBinding);
+ if (status)
+ {
+ ERR("RpcBindingFromStringBinding returned 0x%x\n", status);
+ }
+
+ status = RpcStringFreeA(&pszStringBinding);
+ if (status)
+ {
+ ERR("RpcStringFree returned 0x%x\n", status);
+ }
+
+ return hBinding;
+}
+
+
+void __RPC_USER
+SVCCTL_HANDLEA_unbind(SVCCTL_HANDLEA szMachineName,
+ handle_t hBinding)
+{
+ RPC_STATUS status;
+
+ ERR("SVCCTL_HANDLEA_unbind() called\n");
+
+ status = RpcBindingFree(&hBinding);
+ if (status)
+ {
+ ERR("RpcBindingFree returned 0x%x\n", status);
+ }
+}
+
+
+handle_t __RPC_USER
+SVCCTL_HANDLEW_bind(SVCCTL_HANDLEW szMachineName)
+{
+ handle_t hBinding = NULL;
LPWSTR pszStringBinding;
RPC_STATUS status;
- if (BindingHandle != NULL)
- return;
+ ERR("SVCCTL_HANDLEW_bind() called\n");
+
+
+ status = RpcStringBindingComposeW(szMachineName,
+ L"ncacn_np",
+ NULL,
+ L"\\pipe\\ntsvcs",
+ NULL,
+ &pszStringBinding);
+ if (status)
+ {
+ ERR("RpcStringBindingCompose returned 0x%x\n", status);
+ return NULL;
+ }
+
+ /* Set the binding handle that will be used to bind to the server. */
+ status = RpcBindingFromStringBindingW(pszStringBinding,
+ &hBinding);
+ if (status)
+ {
+ ERR("RpcBindingFromStringBinding returned 0x%x\n", status);
+ }
+
+ status = RpcStringFreeW(&pszStringBinding);
+ if (status)
+ {
+ ERR("RpcStringFree returned 0x%x\n", status);
+ }
+
+ return hBinding;
+}
+
+
+void __RPC_USER
+SVCCTL_HANDLEW_unbind(SVCCTL_HANDLEW szMachineName,
+ handle_t hBinding)
+{
+ RPC_STATUS status;
+
+ ERR("SVCCTL_HANDLEW_unbind() called\n");
+
+ status = RpcBindingFree(&hBinding);
+ if (status)
+ {
+ ERR("RpcBindingFree returned 0x%x\n", status);
+ }
+}
+
+
+handle_t __RPC_USER
+RPC_SERVICE_STATUS_HANDLE_bind(RPC_SERVICE_STATUS_HANDLE hServiceStatus)
+{
+ handle_t hBinding = NULL;
+ LPWSTR pszStringBinding;
+ RPC_STATUS status;
+
+ ERR("RPC_SERVICE_STATUS_HANDLE_bind() called\n");
+
status = RpcStringBindingComposeW(NULL,
L"ncacn_np",
@@ -40,116 +150,6 @@
&pszStringBinding);
if (status)
{
- TRACE("RpcStringBindingCompose returned 0x%x\n", status);
- return;
- }
-
- /* Set the binding handle that will be used to bind to the server. */
- status = RpcBindingFromStringBindingW(pszStringBinding,
- &BindingHandle);
- if (status)
- {
- TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
- }
-
- status = RpcStringFreeW(&pszStringBinding);
- if (status)
- {
- TRACE("RpcStringFree returned 0x%x\n", status);
- }
-}
-
-
-#if 0
-static VOID
-HandleUnbind(VOID)
-{
- RPC_STATUS status;
-
- if (BindingHandle == NULL)
- return;
-
- status = RpcBindingFree(&BindingHandle);
- if (status)
- {
- TRACE("RpcBindingFree returned 0x%x\n", status);
- }
-}
-#endif
-
-handle_t __RPC_USER
-SVCCTL_HANDLEA_bind(SVCCTL_HANDLEA szMachineName)
-{
- handle_t hBinding = NULL;
- UCHAR *pszStringBinding;
- RPC_STATUS status;
-
- ERR("SVCCTL_HANDLEA_bind() called\n");
-
- status = RpcStringBindingComposeA((UCHAR *)szMachineName,
- (UCHAR *)"ncacn_np",
- NULL,
- (UCHAR *)"\\pipe\\ntsvcs",
- NULL,
- (UCHAR **)&pszStringBinding);
- if (status)
- {
- ERR("RpcStringBindingCompose returned 0x%x\n", status);
- return NULL;
- }
-
- /* Set the binding handle that will be used to bind to the server. */
- status = RpcBindingFromStringBindingA(pszStringBinding,
- &hBinding);
- if (status)
- {
- ERR("RpcBindingFromStringBinding returned 0x%x\n", status);
- }
-
- status = RpcStringFreeA(&pszStringBinding);
- if (status)
- {
- ERR("RpcStringFree returned 0x%x\n", status);
- }
-
- return hBinding;
-}
-
-
-void __RPC_USER
-SVCCTL_HANDLEA_unbind(SVCCTL_HANDLEA szMachineName,
- handle_t hBinding)
-{
- RPC_STATUS status;
-
- ERR("SVCCTL_HANDLEA_unbind() called\n");
-
- status = RpcBindingFree(&hBinding);
- if (status)
- {
- ERR("RpcBindingFree returned 0x%x\n", status);
- }
-}
-
-
-handle_t __RPC_USER
-SVCCTL_HANDLEW_bind(SVCCTL_HANDLEW szMachineName)
-{
- handle_t hBinding = NULL;
- LPWSTR pszStringBinding;
- RPC_STATUS status;
-
- ERR("SVCCTL_HANDLEW_bind() called\n");
-
-
- status = RpcStringBindingComposeW(szMachineName,
- L"ncacn_np",
- NULL,
- L"\\pipe\\ntsvcs",
- NULL,
- &pszStringBinding);
- if (status)
- {
ERR("RpcStringBindingCompose returned 0x%x\n", status);
return NULL;
}
@@ -173,62 +173,6 @@
void __RPC_USER
-SVCCTL_HANDLEW_unbind(SVCCTL_HANDLEW szMachineName,
- handle_t hBinding)
-{
- RPC_STATUS status;
-
- ERR("SVCCTL_HANDLEW_unbind() called\n");
-
- status = RpcBindingFree(&hBinding);
- if (status)
- {
- ERR("RpcBindingFree returned 0x%x\n", status);
- }
-}
-
-
-handle_t __RPC_USER
-RPC_SERVICE_STATUS_HANDLE_bind(RPC_SERVICE_STATUS_HANDLE hServiceStatus)
-{
- handle_t hBinding = NULL;
- LPWSTR pszStringBinding;
- RPC_STATUS status;
-
- ERR("RPC_SERVICE_STATUS_HANDLE_bind() called\n");
-
-
- status = RpcStringBindingComposeW(NULL,
- L"ncacn_np",
- NULL,
- L"\\pipe\\ntsvcs",
- NULL,
- &pszStringBinding);
- if (status)
- {
- ERR("RpcStringBindingCompose returned 0x%x\n", status);
- return NULL;
- }
-
- /* Set the binding handle that will be used to bind to the server. */
- status = RpcBindingFromStringBindingW(pszStringBinding,
- &hBinding);
- if (status)
- {
- ERR("RpcBindingFromStringBinding returned 0x%x\n", status);
- }
-
- status = RpcStringFreeW(&pszStringBinding);
- if (status)
- {
- ERR("RpcStringFree returned 0x%x\n", status);
- }
-
- return hBinding;
-}
-
-
-void __RPC_USER
RPC_SERVICE_STATUS_HANDLE_unbind(RPC_SERVICE_STATUS_HANDLE hServiceStatus,
handle_t hBinding)
{
@@ -300,12 +244,9 @@
if (lpInfo == NULL)
return TRUE;
- HandleBind();
-
- _SEH_TRY
- {
- dwError = RChangeServiceConfig2A(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ _SEH_TRY
+ {
+ dwError = RChangeServiceConfig2A((SC_RPC_HANDLE)hService,
Info);
}
_SEH_HANDLE
@@ -363,12 +304,9 @@
if (lpInfo == NULL)
return TRUE;
- HandleBind();
-
- _SEH_TRY
- {
- dwError = RChangeServiceConfig2W(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ _SEH_TRY
+ {
+ dwError = RChangeServiceConfig2W((SC_RPC_HANDLE)hService,
Info);
}
_SEH_HANDLE
@@ -428,13 +366,10 @@
/* FIXME: Encrypt the password */
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RChangeServiceConfigA(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RChangeServiceConfigA((SC_RPC_HANDLE)hService,
dwServiceType,
dwStartType,
dwErrorControl,
@@ -505,13 +440,10 @@
/* FIXME: Encrypt the password */
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RChangeServiceConfigW(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RChangeServiceConfigW((SC_RPC_HANDLE)hService,
dwServiceType,
dwStartType,
dwErrorControl,
@@ -554,13 +486,10 @@
TRACE("CloseServiceHandle() called\n");
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RCloseServiceHandle(BindingHandle,
- (LPSC_RPC_HANDLE)&hSCObject);
+ dwError = RCloseServiceHandle((LPSC_RPC_HANDLE)&hSCObject);
}
_SEH_HANDLE
{
@@ -596,13 +525,10 @@
TRACE("ControlService(%x, %x, %p)\n",
hService, dwControl, lpServiceStatus);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RControlService(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RControlService((SC_RPC_HANDLE)hService,
dwControl,
lpServiceStatus);
}
@@ -853,13 +779,10 @@
/* FIXME: Encrypt the password */
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RCreateServiceW(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ dwError = RCreateServiceW((SC_RPC_HANDLE)hSCManager,
(LPWSTR)lpServiceName,
(LPWSTR)lpDisplayName,
dwDesiredAccess,
@@ -905,13 +828,10 @@
TRACE("DeleteService(%x)\n", hService);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RDeleteService(BindingHandle,
- (SC_RPC_HANDLE)hService);
+ dwError = RDeleteService((SC_RPC_HANDLE)hService);
}
_SEH_HANDLE
{
@@ -949,12 +869,9 @@
TRACE("EnumServicesStatusA() called\n");
- HandleBind();
-
- _SEH_TRY
- {
- dwError = REnumDependentServicesA(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ _SEH_TRY
+ {
+ dwError = REnumDependentServicesA((SC_RPC_HANDLE)hService,
dwServiceState,
(LPBYTE)lpServices,
cbBufSize,
@@ -1013,12 +930,9 @@
TRACE("EnumServicesStatusW() called\n");
- HandleBind();
-
- _SEH_TRY
- {
- dwError = REnumDependentServicesW(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ _SEH_TRY
+ {
+ dwError = REnumDependentServicesW((SC_RPC_HANDLE)hService,
dwServiceState,
(LPBYTE)lpServices,
cbBufSize,
@@ -1103,12 +1017,9 @@
TRACE("EnumServicesStatusA() called\n");
- HandleBind();
-
- _SEH_TRY
- {
- dwError = REnumServicesStatusA(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ _SEH_TRY
+ {
+ dwError = REnumServicesStatusA((SC_RPC_HANDLE)hSCManager,
dwServiceType,
dwServiceState,
(LPBYTE)lpServices,
@@ -1171,12 +1082,9 @@
TRACE("EnumServicesStatusW() called\n");
- HandleBind();
-
- _SEH_TRY
- {
- dwError = REnumServicesStatusW(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ _SEH_TRY
+ {
+ dwError = REnumServicesStatusW((SC_RPC_HANDLE)hSCManager,
dwServiceType,
dwServiceState,
(LPBYTE)lpServices,
@@ -1241,12 +1149,9 @@
TRACE("EnumServicesStatusExA() called\n");
- HandleBind();
-
- _SEH_TRY
- {
- dwError = REnumServicesStatusExA(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ _SEH_TRY
+ {
+ dwError = REnumServicesStatusExA((SC_RPC_HANDLE)hSCManager,
InfoLevel,
dwServiceType,
dwServiceState,
@@ -1321,12 +1226,9 @@
TRACE("EnumServicesStatusExW() called\n");
- HandleBind();
-
- _SEH_TRY
- {
- dwError = REnumServicesStatusExW(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ _SEH_TRY
+ {
+ dwError = REnumServicesStatusExW((SC_RPC_HANDLE)hSCManager,
InfoLevel,
dwServiceType,
dwServiceState,
@@ -1396,12 +1298,9 @@
if (!lpDisplayName)
*lpcchBuffer = 0;
- HandleBind();
-
- _SEH_TRY
- {
- dwError = RGetServiceDisplayNameA(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ _SEH_TRY
+ {
+ dwError = RGetServiceDisplayNameA((SC_RPC_HANDLE)hSCManager,
(LPSTR)lpServiceName,
lpDisplayName,
lpcchBuffer);
@@ -1444,12 +1343,9 @@
if (!lpDisplayName)
*lpcchBuffer = 0;
- HandleBind();
-
- _SEH_TRY
- {
- dwError = RGetServiceDisplayNameW(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ _SEH_TRY
+ {
+ dwError = RGetServiceDisplayNameW((SC_RPC_HANDLE)hSCManager,
(LPWSTR)lpServiceName,
lpDisplayName,
lpcchBuffer);
@@ -1489,12 +1385,9 @@
if (!lpServiceName)
*lpcchBuffer = 0;
- HandleBind();
-
- _SEH_TRY
- {
- dwError = RGetServiceKeyNameA(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ _SEH_TRY
+ {
+ dwError = RGetServiceKeyNameA((SC_RPC_HANDLE)hSCManager,
(LPSTR)lpDisplayName,
lpServiceName,
lpcchBuffer);
@@ -1534,12 +1427,9 @@
if (!lpDisplayName)
*lpcchBuffer = 0;
- HandleBind();
-
- _SEH_TRY
- {
- dwError = RGetServiceKeyNameW(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ _SEH_TRY
+ {
+ dwError = RGetServiceKeyNameW((SC_RPC_HANDLE)hSCManager,
(LPWSTR)lpDisplayName,
lpServiceName,
lpcchBuffer);
@@ -1574,13 +1464,10 @@
TRACE("LockServiceDatabase(%x)\n", hSCManager);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RLockServiceDatabase(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ dwError = RLockServiceDatabase((SC_RPC_HANDLE)hSCManager,
(SC_RPC_LOCK *)&hLock);
}
_SEH_HANDLE
@@ -1660,13 +1547,10 @@
WaitForSCManager();
-// HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = ROpenSCManagerA(//BindingHandle,
- (LPSTR)lpMachineName,
+ dwError = ROpenSCManagerA((LPSTR)lpMachineName,
(LPSTR)lpDatabaseName,
dwDesiredAccess,
(SC_RPC_HANDLE *)&hScm);
@@ -1708,13 +1592,10 @@
WaitForSCManager();
-// HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = ROpenSCManagerW(//BindingHandle,
- (LPWSTR)lpMachineName,
+ dwError = ROpenSCManagerW((LPWSTR)lpMachineName,
(LPWSTR)lpDatabaseName,
dwDesiredAccess,
(SC_RPC_HANDLE *)&hScm);
@@ -1754,13 +1635,10 @@
TRACE("OpenServiceA(%p, %s, %lx)\n",
hSCManager, lpServiceName, dwDesiredAccess);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = ROpenServiceA(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ dwError = ROpenServiceA((SC_RPC_HANDLE)hSCManager,
(LPSTR)lpServiceName,
dwDesiredAccess,
(SC_RPC_HANDLE *)&hService);
@@ -1800,13 +1678,10 @@
TRACE("OpenServiceW(%p, %S, %lx)\n",
hSCManager, lpServiceName, dwDesiredAccess);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = ROpenServiceW(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ dwError = ROpenServiceW((SC_RPC_HANDLE)hSCManager,
(LPWSTR)lpServiceName,
dwDesiredAccess,
(SC_RPC_HANDLE *)&hService);
@@ -1849,13 +1724,10 @@
TRACE("QueryServiceConfigA(%p, %p, %lu, %p)\n",
hService, lpServiceConfig, cbBufSize, pcbBytesNeeded);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceConfigA(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RQueryServiceConfigA((SC_RPC_HANDLE)hService,
(LPBYTE)lpServiceConfig,
cbBufSize,
pcbBytesNeeded);
@@ -1921,13 +1793,10 @@
TRACE("QueryServiceConfigW(%p, %p, %lu, %p)\n",
hService, lpServiceConfig, cbBufSize, pcbBytesNeeded);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceConfigW(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RQueryServiceConfigW((SC_RPC_HANDLE)hService,
(LPBYTE)lpServiceConfig,
cbBufSize,
pcbBytesNeeded);
@@ -2011,13 +1880,10 @@
return FALSE;
}
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceConfig2A(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RQueryServiceConfig2A((SC_RPC_HANDLE)hService,
dwInfoLevel,
lpBuffer,
cbBufSize,
@@ -2109,13 +1975,10 @@
return FALSE;
}
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceConfig2W(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RQueryServiceConfig2W((SC_RPC_HANDLE)hService,
dwInfoLevel,
lpBuffer,
cbBufSize,
@@ -2191,13 +2054,10 @@
TRACE("QueryServiceLockStatusA() called\n");
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceLockStatusA(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ dwError = RQueryServiceLockStatusA((SC_RPC_HANDLE)hSCManager,
lpLockStatus,
cbBufSize,
pcbBytesNeeded);
@@ -2242,13 +2102,10 @@
TRACE("QueryServiceLockStatusW() called\n");
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceLockStatusW(BindingHandle,
- (SC_RPC_HANDLE)hSCManager,
+ dwError = RQueryServiceLockStatusW((SC_RPC_HANDLE)hSCManager,
lpLockStatus,
cbBufSize,
pcbBytesNeeded);
@@ -2295,13 +2152,10 @@
TRACE("QueryServiceObjectSecurity(%p, %lu, %p)\n",
hService, dwSecurityInformation, lpSecurityDescriptor);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceObjectSecurity(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RQueryServiceObjectSecurity((SC_RPC_HANDLE)hService,
dwSecurityInformation,
(LPBYTE)lpSecurityDescriptor,
cbBufSize,
@@ -2365,13 +2219,10 @@
return FALSE;
}
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RSetServiceObjectSecurity(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RSetServiceObjectSecurity((SC_RPC_HANDLE)hService,
dwSecurityInformation,
(LPBYTE)SelfRelativeSD,
Length);
@@ -2409,13 +2260,10 @@
TRACE("QueryServiceStatus(%p, %p)\n",
hService, lpServiceStatus);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceStatus(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RQueryServiceStatus((SC_RPC_HANDLE)hService,
lpServiceStatus);
}
_SEH_HANDLE
@@ -2451,13 +2299,10 @@
TRACE("QueryServiceStatusEx() called\n");
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RQueryServiceStatusEx(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ dwError = RQueryServiceStatusEx((SC_RPC_HANDLE)hService,
InfoLevel,
lpBuffer,
cbBufSize,
@@ -2492,12 +2337,9 @@
{
DWORD dwError;
- HandleBind();
-
- _SEH_TRY
- {
- dwError = RStartServiceA(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ _SEH_TRY
+ {
+ dwError = RStartServiceA((SC_RPC_HANDLE)hService,
dwNumServiceArgs,
(LPSTRING_PTRSA)lpServiceArgVectors);
}
@@ -2530,12 +2372,9 @@
{
DWORD dwError;
- HandleBind();
-
- _SEH_TRY
- {
- dwError = RStartServiceW(BindingHandle,
- (SC_RPC_HANDLE)hService,
+ _SEH_TRY
+ {
+ dwError = RStartServiceW((SC_RPC_HANDLE)hService,
dwNumServiceArgs,
(LPSTRING_PTRSW)lpServiceArgVectors);
}
@@ -2568,13 +2407,10 @@
TRACE("UnlockServiceDatabase(%x)\n", ScLock);
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RUnlockServiceDatabase(BindingHandle,
- (LPSC_RPC_LOCK)&ScLock);
+ dwError = RUnlockServiceDatabase((LPSC_RPC_LOCK)&ScLock);
}
_SEH_HANDLE
{
@@ -2605,13 +2441,10 @@
TRACE("NotifyBootConfigStatus()\n");
- HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- dwError = RNotifyBootConfigStatus(BindingHandle,
- NULL,
+ dwError = RNotifyBootConfigStatus(NULL,
BootAcceptable);
}
_SEH_HANDLE
Modified: trunk/reactos/dll/win32/advapi32/service/sctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] Sun Oct 26 10:11:28
2008
@@ -19,8 +19,6 @@
/* TYPES *********************************************************************/
-
-VOID HandleBind(VOID);
typedef struct _ACTIVE_SERVICE
{
@@ -42,7 +40,6 @@
/* GLOBALS *******************************************************************/
-extern handle_t BindingHandle;
static DWORD dwActiveServiceCount = 0;
static PACTIVE_SERVICE lpActiveServices = NULL;
@@ -544,13 +541,10 @@
{
BOOL bResult;
-// HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- bResult = RI_ScSetServiceBitsA(//BindingHandle,
- (RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
+ bResult = RI_ScSetServiceBitsA((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
dwServiceBits,
bSetBitsOn,
bUpdateImmediately,
@@ -583,13 +577,10 @@
{
BOOL bResult;
-// HandleBind();
-
_SEH_TRY
{
/* Call to services.exe using RPC */
- bResult = RI_ScSetServiceBitsW(//BindingHandle,
- (RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
+ bResult = RI_ScSetServiceBitsW((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
dwServiceBits,
bSetBitsOn,
bUpdateImmediately,
@@ -639,11 +630,8 @@
TRACE("SetServiceStatus() called\n");
TRACE("hServiceStatus %lu\n", hServiceStatus);
-// HandleBind();
-
/* Call to services.exe using RPC */
- dwError = RSetServiceStatus(//BindingHandle,
- (RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
+ dwError = RSetServiceStatus((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
lpServiceStatus);
if (dwError != ERROR_SUCCESS)
{
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] Sun Oct 26 10:11:28 2008
@@ -18,11 +18,11 @@
typedef [handle] LPSTR SVCCTL_HANDLEA;
typedef [handle] LPWSTR SVCCTL_HANDLEW;
typedef [handle] ULONG_PTR RPC_SERVICE_STATUS_HANDLE;
-typedef /*[context_handle]*/ unsigned long SC_RPC_HANDLE;
+typedef [context_handle] PVOID SC_RPC_HANDLE;
typedef SC_RPC_HANDLE* LPSC_RPC_HANDLE;
-typedef /*[context_handle]*/ unsigned long SC_RPC_LOCK;
+typedef [context_handle] PVOID SC_RPC_LOCK;
typedef SC_RPC_LOCK* LPSC_RPC_LOCK;
-typedef /*[context_handle]*/ unsigned long SC_NOTIFY_RPC_HANDLE;
+typedef [context_handle] PVOID SC_NOTIFY_RPC_HANDLE;
typedef SC_NOTIFY_RPC_HANDLE* LPSC_NOTIFY_RPC_HANDLE;
typedef [range(0, 1024 * 4)] DWORD BOUNDED_DWORD_4K;
typedef BOUNDED_DWORD_4K* LPBOUNDED_DWORD_4K;
@@ -297,38 +297,33 @@
uuid(367abb81-9844-35f1-ad32-98f038001003),
version(2.0),
pointer_default(unique),
-// #ifndef __midl
+ #ifndef __midl
,explicit_handle
-// #endif
+ #endif
]
interface svcctl
{
/* Function 0 */
DWORD RCloseServiceHandle(
- [in] handle_t BindingHandle,
[in, out] LPSC_RPC_HANDLE hSCObject);
/* Function 1 */
DWORD RControlService(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwControl,
[out] LPSERVICE_STATUS lpServiceStatus);
/* Function 2 */
DWORD RDeleteService(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService);
/* Function 3 */
DWORD RLockServiceDatabase(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[out] LPSC_RPC_LOCK lpLock);
/* Function 4 */
DWORD RQueryServiceObjectSecurity(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] SECURITY_INFORMATION dwSecurityInformation,
[out, size_is(cbBufSize)] LPBYTE lpSecurityDescriptor,
@@ -337,7 +332,6 @@
/* Function 5 */
DWORD RSetServiceObjectSecurity(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwSecurityInformation,
[in, size_is(dwSecuityDescriptorSize)] LPBYTE lpSecurityDescriptor,
@@ -345,30 +339,25 @@
/* Function 6 */
DWORD RQueryServiceStatus(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[out] LPSERVICE_STATUS lpServiceStatus);
/* Function 7 */
DWORD RSetServiceStatus(
-// [in] handle_t BindingHandle,
[in] RPC_SERVICE_STATUS_HANDLE hServiceStatus,
[in] LPSERVICE_STATUS lpServiceStatus);
/* Function 8 */
DWORD RUnlockServiceDatabase(
- [in] handle_t BindingHandle,
[in, out] LPSC_RPC_LOCK Lock);
/* Function 9 */
DWORD RNotifyBootConfigStatus(
- [in] handle_t BindingHandle,
[in, string, unique, range(0, SC_MAX_COMPUTER_NAME_LENGTH)] SVCCTL_HANDLEW
lpMachineName,
[in] DWORD BootAcceptable);
/* Function 10 */
DWORD RI_ScSetServiceBitsW(
-// [in] handle_t BindingHandle,
[in] RPC_SERVICE_STATUS_HANDLE hServiceStatus,
[in] DWORD dwServiceBits,
[in] BOOL bSetBitsOn,
@@ -377,7 +366,6 @@
/* Function 11 */
DWORD RChangeServiceConfigW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwServiceType,
[in] DWORD dwStartType,
@@ -394,7 +382,6 @@
/* Function 12 */
DWORD RCreateServiceW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName,
[in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpDisplayName,
@@ -414,7 +401,6 @@
/* Function 13 */
DWORD REnumDependentServicesW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwServiceState,
[out, size_is(cbBufSize)] LPBYTE lpServices,
@@ -424,7 +410,6 @@
/* Function 14 */
DWORD REnumServicesStatusW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in] DWORD dwServiceType,
[in] DWORD dwServiceState,
@@ -436,7 +421,6 @@
/* Function 15 */
DWORD ROpenSCManagerW(
-// [in] handle_t BindingHandle,
[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,
@@ -444,7 +428,6 @@
/* Function 16 */
DWORD ROpenServiceW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in, string, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpServiceName,
[in] DWORD dwDesiredAccess,
@@ -452,7 +435,6 @@
/* Function 17 */
DWORD RQueryServiceConfigW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[out, unique, size_is(cbBufSize)] LPBYTE lpServiceConfig,
/* FIXME: should be [out] LPQUERY_SERVICE_CONFIGW lpServiceConfig, */
@@ -461,7 +443,6 @@
/* Function 18 */
DWORD RQueryServiceLockStatusW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[out] LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus,
[in, range(0, 1024*4)] DWORD cbBufSize,
@@ -469,14 +450,12 @@
/* Function 19 */
DWORD RStartServiceW(
- [in] handle_t BindingHandle,
[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] handle_t BindingHandle,
[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,
@@ -484,7 +463,6 @@
/* Function 21 */
DWORD RGetServiceKeyNameW(
- [in] handle_t BindingHandle,
[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,
@@ -492,7 +470,6 @@
/* Function 22 */
DWORD RI_ScSetServiceBitsA(
-// [in] handle_t BindingHandle,
[in] RPC_SERVICE_STATUS_HANDLE hServiceStatus,
[in] DWORD dwServiceBits,
[in] BOOL bSetBitsOn,
@@ -501,7 +478,6 @@
/* Function 23 */
DWORD RChangeServiceConfigA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwServiceType,
[in] DWORD dwStartType,
@@ -518,7 +494,6 @@
/* Function 24 */
DWORD RCreateServiceA(
- [in] handle_t BindingHandle,
[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,
@@ -538,7 +513,6 @@
/* Function 25 */
DWORD REnumDependentServicesA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwServiceState,
[out, size_is(cbBufSize)] LPBYTE lpServices,
@@ -548,7 +522,6 @@
/* Function 26 */
DWORD REnumServicesStatusA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in] DWORD dwServiceType,
[in] DWORD dwServiceState,
@@ -560,7 +533,6 @@
/* Function 27 */
DWORD ROpenSCManagerA(
-// [in] handle_t BindingHandle,
[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,
@@ -568,7 +540,6 @@
/* Function 28 */
DWORD ROpenServiceA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName,
[in] DWORD dwDesiredAccess,
@@ -576,7 +547,6 @@
/* Function 29 */
DWORD RQueryServiceConfigA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[out, unique, size_is(cbBufSize)] LPBYTE lpServiceConfig,
/* FIXME: should be [out] LPQUERY_SERVICE_CONFIGA lpServiceConfig, */
@@ -585,7 +555,6 @@
/* Function 30 */
DWORD RQueryServiceLockStatusA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[out] LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus,
[in, range(0, 1024*4)] DWORD cbBufSize,
@@ -593,14 +562,12 @@
/* Function 31 */
DWORD RStartServiceA(
- [in] handle_t BindingHandle,
[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] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpServiceName,
[out, string, size_is(*lpcchBuffer)] LPSTR lpDisplayName,
@@ -608,7 +575,6 @@
/* Function 33 */
DWORD RGetServiceKeyNameA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in, string, range(0, SC_MAX_NAME_LENGTH)] LPSTR lpDisplayName,
[out, string, size_is(*lpcchBuffer)] LPSTR lpKeyName,
@@ -616,14 +582,12 @@
/* Function 34 */
DWORD RI_ScGetCurrentGroupStateW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in, string, unique, range(0, SC_MAX_NAME_LENGTH)] LPWSTR lpLoadOrderGroup,
[out] LPDWORD lpState);
/* Function 35 */
DWORD REnumServiceGroupW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in] DWORD dwServiceType,
[in] DWORD dwServiceState,
@@ -636,19 +600,16 @@
/* Function 36 */
DWORD RChangeServiceConfig2A(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] SC_RPC_CONFIG_INFOA Info);
/* Function 37 */
DWORD RChangeServiceConfig2W(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] SC_RPC_CONFIG_INFOW Info);
/* Function 38 */
DWORD RQueryServiceConfig2A(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwInfoLevel,
[out, size_is(cbBufSize)] LPBYTE lpBuffer,
@@ -657,7 +618,6 @@
/* Function 39 */
DWORD RQueryServiceConfig2W(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwInfoLevel,
[out, size_is(cbBufSize)] LPBYTE lpBuffer,
@@ -666,7 +626,6 @@
/* Function 40 */
DWORD RQueryServiceStatusEx(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] SC_STATUS_TYPE InfoLevel,
[out, size_is(cbBufSize)] LPBYTE lpBuffer,
@@ -675,7 +634,6 @@
/* Function 41 */
DWORD REnumServicesStatusExA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in] SC_ENUM_TYPE InfoLevel,
[in] DWORD dwServiceType,
@@ -689,7 +647,6 @@
/* Function 42 */
DWORD REnumServicesStatusExW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hSCManager,
[in] SC_ENUM_TYPE InfoLevel,
[in] DWORD dwServiceType,
@@ -749,7 +706,6 @@
/* Function 47 */
DWORD RNotifyServiceStatusChange(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] SC_RPC_NOTIFY_PARAMS NotifyParams,
[in] GUID* pClientProcessGuid,
@@ -759,19 +715,16 @@
/* Function 48 */
DWORD RGetNotifyResults(
- [in] handle_t BindingHandle,
[in] SC_NOTIFY_RPC_HANDLE hNotify,
[out] PSC_RPC_NOTIFY_PARAMS_LIST *ppNotifyParams);
/* Function 49 */
DWORD RCloseNotifyHandle(
- [in] handle_t BindingHandle,
[in, out] LPSC_NOTIFY_RPC_HANDLE phNotify,
[out] PBOOL pfApcFired);
/* Function 50 */
DWORD RControlServiceExA(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwControl,
[in] DWORD dwInfoLevel/*,
@@ -780,7 +733,6 @@
/* Function 51 */
DWORD RControlServiceExW(
- [in] handle_t BindingHandle,
[in] SC_RPC_HANDLE hService,
[in] DWORD dwControl,
[in] DWORD dwInfoLevel/*,