mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:21:51 +00:00
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. svn path=/trunk/; revision=36991
This commit is contained in:
parent
323b029e49
commit
725ff32421
4 changed files with 54 additions and 331 deletions
|
@ -400,7 +400,6 @@ Int_EnumDependentServicesW(HKEY hServicesKey,
|
|||
|
||||
/* Function 0 */
|
||||
DWORD RCloseServiceHandle(
|
||||
handle_t BindingHandle,
|
||||
LPSC_RPC_HANDLE hSCObject)
|
||||
{
|
||||
PMANAGER_HANDLE hManager;
|
||||
|
@ -526,7 +525,6 @@ DWORD RCloseServiceHandle(
|
|||
|
||||
/* Function 1 */
|
||||
DWORD RControlService(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwControl,
|
||||
LPSERVICE_STATUS lpServiceStatus)
|
||||
|
@ -657,7 +655,6 @@ DWORD RControlService(
|
|||
|
||||
/* Function 2 */
|
||||
DWORD RDeleteService(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService)
|
||||
{
|
||||
PSERVICE_HANDLE hSvc;
|
||||
|
@ -707,7 +704,6 @@ DWORD RDeleteService(
|
|||
|
||||
/* Function 3 */
|
||||
DWORD RLockServiceDatabase(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPSC_RPC_LOCK lpLock)
|
||||
{
|
||||
|
@ -736,7 +732,6 @@ DWORD RLockServiceDatabase(
|
|||
|
||||
/* Function 4 */
|
||||
DWORD RQueryServiceObjectSecurity(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
SECURITY_INFORMATION dwSecurityInformation,
|
||||
LPBYTE lpSecurityDescriptor,
|
||||
|
@ -820,7 +815,6 @@ DWORD RQueryServiceObjectSecurity(
|
|||
|
||||
/* Function 5 */
|
||||
DWORD RSetServiceObjectSecurity(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwSecurityInformation,
|
||||
LPBYTE lpSecurityDescriptor,
|
||||
|
@ -940,7 +934,6 @@ Done:
|
|||
|
||||
/* Function 6 */
|
||||
DWORD RQueryServiceStatus(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
LPSERVICE_STATUS lpServiceStatus)
|
||||
{
|
||||
|
@ -1004,7 +997,6 @@ ScmIsValidServiceState(DWORD dwCurrentState)
|
|||
|
||||
/* Function 7 */
|
||||
DWORD RSetServiceStatus(
|
||||
// handle_t BindingHandle,
|
||||
RPC_SERVICE_STATUS_HANDLE hServiceStatus,
|
||||
LPSERVICE_STATUS lpServiceStatus)
|
||||
{
|
||||
|
@ -1070,7 +1062,6 @@ DWORD RSetServiceStatus(
|
|||
|
||||
/* Function 8 */
|
||||
DWORD RUnlockServiceDatabase(
|
||||
handle_t BindingHandle,
|
||||
LPSC_RPC_LOCK Lock)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
|
@ -1080,7 +1071,6 @@ DWORD RUnlockServiceDatabase(
|
|||
|
||||
/* Function 9 */
|
||||
DWORD RNotifyBootConfigStatus(
|
||||
handle_t BindingHandle,
|
||||
SVCCTL_HANDLEW lpMachineName,
|
||||
DWORD BootAcceptable)
|
||||
{
|
||||
|
@ -1091,7 +1081,6 @@ DWORD RNotifyBootConfigStatus(
|
|||
|
||||
/* Function 10 */
|
||||
DWORD RI_ScSetServiceBitsW(
|
||||
// handle_t BindingHandle,
|
||||
RPC_SERVICE_STATUS_HANDLE hServiceStatus,
|
||||
DWORD dwServiceBits,
|
||||
int bSetBitsOn,
|
||||
|
@ -1105,7 +1094,6 @@ DWORD RI_ScSetServiceBitsW(
|
|||
|
||||
/* Function 11 */
|
||||
DWORD RChangeServiceConfigW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwServiceType,
|
||||
DWORD dwStartType,
|
||||
|
@ -1715,7 +1703,6 @@ ScmCanonDriverImagePath(DWORD dwStartType,
|
|||
|
||||
/* Function 12 */
|
||||
DWORD RCreateServiceW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPWSTR lpServiceName,
|
||||
LPWSTR lpDisplayName,
|
||||
|
@ -2051,7 +2038,6 @@ done:;
|
|||
|
||||
/* Function 13 */
|
||||
DWORD REnumDependentServicesW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwServiceState,
|
||||
LPBYTE lpServices,
|
||||
|
@ -2181,7 +2167,6 @@ Done:
|
|||
|
||||
/* Function 14 */
|
||||
DWORD REnumServicesStatusW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
DWORD dwServiceType,
|
||||
DWORD dwServiceState,
|
||||
|
@ -2388,7 +2373,6 @@ Done:;
|
|||
|
||||
/* Function 15 */
|
||||
DWORD ROpenSCManagerW(
|
||||
// handle_t BindingHandle,
|
||||
LPWSTR lpMachineName,
|
||||
LPWSTR lpDatabaseName,
|
||||
DWORD dwDesiredAccess,
|
||||
|
@ -2439,7 +2423,6 @@ DWORD ROpenSCManagerW(
|
|||
|
||||
/* Function 16 */
|
||||
DWORD ROpenServiceW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPWSTR lpServiceName,
|
||||
DWORD dwDesiredAccess,
|
||||
|
@ -2515,7 +2498,6 @@ DWORD ROpenServiceW(
|
|||
|
||||
/* Function 17 */
|
||||
DWORD RQueryServiceConfigW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
LPBYTE lpBuf, //LPQUERY_SERVICE_CONFIGW lpServiceConfig,
|
||||
DWORD cbBufSize,
|
||||
|
@ -2692,7 +2674,6 @@ Done:;
|
|||
|
||||
/* Function 18 */
|
||||
DWORD RQueryServiceLockStatusW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus,
|
||||
DWORD cbBufSize,
|
||||
|
@ -2705,7 +2686,6 @@ DWORD RQueryServiceLockStatusW(
|
|||
|
||||
/* Function 19 */
|
||||
DWORD RStartServiceW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD argc,
|
||||
LPSTRING_PTRSW argv)
|
||||
|
@ -2760,7 +2740,6 @@ DWORD RStartServiceW(
|
|||
|
||||
/* Function 20 */
|
||||
DWORD RGetServiceDisplayNameW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPWSTR lpServiceName,
|
||||
LPWSTR lpDisplayName,
|
||||
|
@ -2832,7 +2811,6 @@ DWORD RGetServiceDisplayNameW(
|
|||
|
||||
/* Function 21 */
|
||||
DWORD RGetServiceKeyNameW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPWSTR lpDisplayName,
|
||||
LPWSTR lpServiceName,
|
||||
|
@ -2893,7 +2871,6 @@ DWORD RGetServiceKeyNameW(
|
|||
|
||||
/* Function 22 */
|
||||
DWORD RI_ScSetServiceBitsA(
|
||||
// handle_t BindingHandle,
|
||||
RPC_SERVICE_STATUS_HANDLE hServiceStatus,
|
||||
DWORD dwServiceBits,
|
||||
int bSetBitsOn,
|
||||
|
@ -2907,7 +2884,6 @@ DWORD RI_ScSetServiceBitsA(
|
|||
|
||||
/* Function 23 */
|
||||
DWORD RChangeServiceConfigA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwServiceType,
|
||||
DWORD dwStartType,
|
||||
|
@ -3192,7 +3168,6 @@ done:
|
|||
|
||||
/* Function 24 */
|
||||
DWORD RCreateServiceA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPSTR lpServiceName,
|
||||
LPSTR lpDisplayName,
|
||||
|
@ -3217,7 +3192,6 @@ DWORD RCreateServiceA(
|
|||
|
||||
/* Function 25 */
|
||||
DWORD REnumDependentServicesA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwServiceState,
|
||||
LPBYTE lpServices,
|
||||
|
@ -3365,7 +3339,6 @@ Done:
|
|||
|
||||
/* Function 26 */
|
||||
DWORD REnumServicesStatusA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
DWORD dwServiceType,
|
||||
DWORD dwServiceState,
|
||||
|
@ -3394,7 +3367,7 @@ DWORD REnumServicesStatusA(
|
|||
}
|
||||
}
|
||||
|
||||
dwError = REnumServicesStatusW(BindingHandle,
|
||||
dwError = REnumServicesStatusW(//BindingHandle,
|
||||
hSCManager,
|
||||
dwServiceType,
|
||||
dwServiceState,
|
||||
|
@ -3462,7 +3435,6 @@ Done:;
|
|||
|
||||
/* Function 27 */
|
||||
DWORD ROpenSCManagerA(
|
||||
// handle_t BindingHandle,
|
||||
LPSTR lpMachineName,
|
||||
LPSTR lpDatabaseName,
|
||||
DWORD dwDesiredAccess,
|
||||
|
@ -3500,7 +3472,6 @@ DWORD ROpenSCManagerA(
|
|||
|
||||
/* Function 28 */
|
||||
DWORD ROpenServiceA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPSTR lpServiceName,
|
||||
DWORD dwDesiredAccess,
|
||||
|
@ -3515,7 +3486,7 @@ DWORD ROpenServiceA(
|
|||
RtlCreateUnicodeStringFromAsciiz(&ServiceName,
|
||||
lpServiceName);
|
||||
|
||||
dwError = ROpenServiceW(BindingHandle,
|
||||
dwError = ROpenServiceW(//BindingHandle,
|
||||
hSCManager,
|
||||
lpServiceName ? ServiceName.Buffer : NULL,
|
||||
dwDesiredAccess,
|
||||
|
@ -3530,7 +3501,6 @@ DWORD ROpenServiceA(
|
|||
|
||||
/* Function 29 */
|
||||
DWORD RQueryServiceConfigA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
LPBYTE lpBuf, //LPQUERY_SERVICE_CONFIGA lpServiceConfig,
|
||||
DWORD cbBufSize,
|
||||
|
@ -3739,7 +3709,6 @@ Done:;
|
|||
|
||||
/* Function 30 */
|
||||
DWORD RQueryServiceLockStatusA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus,
|
||||
DWORD cbBufSize,
|
||||
|
@ -3752,7 +3721,6 @@ DWORD RQueryServiceLockStatusA(
|
|||
|
||||
/* Function 31 */
|
||||
DWORD RStartServiceA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD argc,
|
||||
LPSTRING_PTRSA argv)
|
||||
|
@ -3806,7 +3774,6 @@ DWORD RStartServiceA(
|
|||
|
||||
/* Function 32 */
|
||||
DWORD RGetServiceDisplayNameA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPSTR lpServiceName,
|
||||
LPSTR lpDisplayName,
|
||||
|
@ -3908,7 +3875,6 @@ DWORD RGetServiceDisplayNameA(
|
|||
|
||||
/* Function 33 */
|
||||
DWORD RGetServiceKeyNameA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPSTR lpDisplayName,
|
||||
LPSTR lpServiceName,
|
||||
|
@ -3983,7 +3949,6 @@ DWORD RGetServiceKeyNameA(
|
|||
|
||||
/* Function 34 */
|
||||
DWORD RI_ScGetCurrentGroupStateW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPWSTR lpLoadOrderGroup,
|
||||
LPDWORD lpState)
|
||||
|
@ -3995,7 +3960,6 @@ DWORD RI_ScGetCurrentGroupStateW(
|
|||
|
||||
/* Function 35 */
|
||||
DWORD REnumServiceGroupW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
DWORD dwServiceType,
|
||||
DWORD dwServiceState,
|
||||
|
@ -4013,7 +3977,6 @@ DWORD REnumServiceGroupW(
|
|||
|
||||
/* Function 36 */
|
||||
DWORD RChangeServiceConfig2A(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
SC_RPC_CONFIG_INFOA Info)
|
||||
{
|
||||
|
@ -4024,7 +3987,6 @@ DWORD RChangeServiceConfig2A(
|
|||
|
||||
/* Function 37 */
|
||||
DWORD RChangeServiceConfig2W(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
SC_RPC_CONFIG_INFOW Info)
|
||||
{
|
||||
|
@ -4117,7 +4079,6 @@ done:
|
|||
|
||||
/* Function 38 */
|
||||
DWORD RQueryServiceConfig2A(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwInfoLevel,
|
||||
LPBYTE lpBuffer,
|
||||
|
@ -4225,7 +4186,6 @@ done:
|
|||
|
||||
/* Function 39 */
|
||||
DWORD RQueryServiceConfig2W(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwInfoLevel,
|
||||
LPBYTE lpBuffer,
|
||||
|
@ -4324,7 +4284,6 @@ done:
|
|||
|
||||
/* Function 40 */
|
||||
DWORD RQueryServiceStatusEx(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
SC_STATUS_TYPE InfoLevel,
|
||||
LPBYTE lpBuffer,
|
||||
|
@ -4385,7 +4344,6 @@ DWORD RQueryServiceStatusEx(
|
|||
|
||||
/* Function 41 */
|
||||
DWORD REnumServicesStatusExA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
SC_ENUM_TYPE InfoLevel,
|
||||
DWORD dwServiceType,
|
||||
|
@ -4433,8 +4391,7 @@ DWORD REnumServicesStatusExA(
|
|||
}
|
||||
}
|
||||
|
||||
dwError = REnumServicesStatusExW(BindingHandle,
|
||||
hSCManager,
|
||||
dwError = REnumServicesStatusExW(hSCManager,
|
||||
InfoLevel,
|
||||
dwServiceType,
|
||||
dwServiceState,
|
||||
|
@ -4507,7 +4464,6 @@ Done:;
|
|||
|
||||
/* Function 42 */
|
||||
DWORD REnumServicesStatusExW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
SC_ENUM_TYPE InfoLevel,
|
||||
DWORD dwServiceType,
|
||||
|
@ -4782,7 +4738,7 @@ Done:;
|
|||
|
||||
/* Function 43 */
|
||||
DWORD RSendTSMessage(
|
||||
handle_t BindingHandle)
|
||||
handle_t BindingHandle) /* FIXME */
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
|
@ -4839,7 +4795,7 @@ DWORD RCreateServiceWOW64W(
|
|||
|
||||
/* Function 46 */
|
||||
DWORD RQueryServiceTagInfo(
|
||||
handle_t BindingHandle)
|
||||
handle_t BindingHandle) /* FIXME */
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
|
@ -4848,7 +4804,6 @@ DWORD RQueryServiceTagInfo(
|
|||
|
||||
/* Function 47 */
|
||||
DWORD RNotifyServiceStatusChange(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
SC_RPC_NOTIFY_PARAMS NotifyParams,
|
||||
GUID *pClientProcessGuid,
|
||||
|
@ -4863,7 +4818,6 @@ DWORD RNotifyServiceStatusChange(
|
|||
|
||||
/* Function 48 */
|
||||
DWORD RGetNotifyResults(
|
||||
handle_t BindingHandle,
|
||||
SC_NOTIFY_RPC_HANDLE hNotify,
|
||||
PSC_RPC_NOTIFY_PARAMS_LIST *ppNotifyParams)
|
||||
{
|
||||
|
@ -4874,7 +4828,6 @@ DWORD RGetNotifyResults(
|
|||
|
||||
/* Function 49 */
|
||||
DWORD RCloseNotifyHandle(
|
||||
handle_t BindingHandle,
|
||||
LPSC_NOTIFY_RPC_HANDLE phNotify,
|
||||
PBOOL pfApcFired)
|
||||
{
|
||||
|
@ -4885,7 +4838,6 @@ DWORD RCloseNotifyHandle(
|
|||
|
||||
/* Function 50 */
|
||||
DWORD RControlServiceExA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwControl,
|
||||
DWORD dwInfoLevel)
|
||||
|
@ -4897,7 +4849,6 @@ DWORD RControlServiceExA(
|
|||
|
||||
/* Function 51 */
|
||||
DWORD RControlServiceExW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hService,
|
||||
DWORD dwControl,
|
||||
DWORD dwInfoLevel)
|
||||
|
@ -4909,7 +4860,7 @@ DWORD RControlServiceExW(
|
|||
|
||||
/* Function 52 */
|
||||
DWORD RSendPnPMessage(
|
||||
handle_t BindingHandle)
|
||||
handle_t BindingHandle) /* FIXME */
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
|
@ -4918,7 +4869,7 @@ DWORD RSendPnPMessage(
|
|||
|
||||
/* Function 53 */
|
||||
DWORD RValidatePnPService(
|
||||
handle_t BindingHandle)
|
||||
handle_t BindingHandle) /* FIXME */
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
|
@ -4927,7 +4878,7 @@ DWORD RValidatePnPService(
|
|||
|
||||
/* Function 54 */
|
||||
DWORD ROpenServiceStatusHandle(
|
||||
handle_t BindingHandle)
|
||||
handle_t BindingHandle) /* FIXME */
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
|
@ -4936,7 +4887,7 @@ DWORD ROpenServiceStatusHandle(
|
|||
|
||||
/* Function 55 */
|
||||
DWORD RFunction55(
|
||||
handle_t BindingHandle)
|
||||
handle_t BindingHandle) /* FIXME */
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
|
@ -4969,5 +4920,4 @@ void __RPC_USER SC_NOTIFY_RPC_HANDLE_rundown(SC_NOTIFY_RPC_HANDLE hNotify)
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -21,62 +21,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi);
|
|||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
handle_t BindingHandle = NULL;
|
||||
|
||||
VOID
|
||||
HandleBind(VOID)
|
||||
{
|
||||
LPWSTR pszStringBinding;
|
||||
RPC_STATUS status;
|
||||
|
||||
if (BindingHandle != NULL)
|
||||
return;
|
||||
|
||||
status = RpcStringBindingComposeW(NULL,
|
||||
L"ncacn_np",
|
||||
NULL,
|
||||
L"\\pipe\\ntsvcs",
|
||||
NULL,
|
||||
&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)
|
||||
{
|
||||
|
@ -300,12 +244,9 @@ ChangeServiceConfig2A(SC_HANDLE hService,
|
|||
if (lpInfo == NULL)
|
||||
return TRUE;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = RChangeServiceConfig2A(BindingHandle,
|
||||
(SC_RPC_HANDLE)hService,
|
||||
dwError = RChangeServiceConfig2A((SC_RPC_HANDLE)hService,
|
||||
Info);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
|
@ -363,12 +304,9 @@ ChangeServiceConfig2W(SC_HANDLE hService,
|
|||
if (lpInfo == NULL)
|
||||
return TRUE;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = RChangeServiceConfig2W(BindingHandle,
|
||||
(SC_RPC_HANDLE)hService,
|
||||
dwError = RChangeServiceConfig2W((SC_RPC_HANDLE)hService,
|
||||
Info);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
|
@ -428,13 +366,10 @@ ChangeServiceConfigA(SC_HANDLE hService,
|
|||
|
||||
/* 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 @@ ChangeServiceConfigW(SC_HANDLE hService,
|
|||
|
||||
/* 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 @@ CloseServiceHandle(SC_HANDLE hSCObject)
|
|||
|
||||
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 @@ ControlService(SC_HANDLE hService,
|
|||
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 @@ CreateServiceW(SC_HANDLE hSCManager,
|
|||
|
||||
/* 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 @@ DeleteService(SC_HANDLE hService)
|
|||
|
||||
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 @@ EnumDependentServicesA(SC_HANDLE hService,
|
|||
|
||||
TRACE("EnumServicesStatusA() called\n");
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = REnumDependentServicesA(BindingHandle,
|
||||
(SC_RPC_HANDLE)hService,
|
||||
dwError = REnumDependentServicesA((SC_RPC_HANDLE)hService,
|
||||
dwServiceState,
|
||||
(LPBYTE)lpServices,
|
||||
cbBufSize,
|
||||
|
@ -1013,12 +930,9 @@ EnumDependentServicesW(SC_HANDLE hService,
|
|||
|
||||
TRACE("EnumServicesStatusW() called\n");
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = REnumDependentServicesW(BindingHandle,
|
||||
(SC_RPC_HANDLE)hService,
|
||||
dwError = REnumDependentServicesW((SC_RPC_HANDLE)hService,
|
||||
dwServiceState,
|
||||
(LPBYTE)lpServices,
|
||||
cbBufSize,
|
||||
|
@ -1103,12 +1017,9 @@ EnumServicesStatusA(SC_HANDLE hSCManager,
|
|||
|
||||
TRACE("EnumServicesStatusA() called\n");
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = REnumServicesStatusA(BindingHandle,
|
||||
(SC_RPC_HANDLE)hSCManager,
|
||||
dwError = REnumServicesStatusA((SC_RPC_HANDLE)hSCManager,
|
||||
dwServiceType,
|
||||
dwServiceState,
|
||||
(LPBYTE)lpServices,
|
||||
|
@ -1171,12 +1082,9 @@ EnumServicesStatusW(SC_HANDLE hSCManager,
|
|||
|
||||
TRACE("EnumServicesStatusW() called\n");
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = REnumServicesStatusW(BindingHandle,
|
||||
(SC_RPC_HANDLE)hSCManager,
|
||||
dwError = REnumServicesStatusW((SC_RPC_HANDLE)hSCManager,
|
||||
dwServiceType,
|
||||
dwServiceState,
|
||||
(LPBYTE)lpServices,
|
||||
|
@ -1241,12 +1149,9 @@ EnumServicesStatusExA(SC_HANDLE hSCManager,
|
|||
|
||||
TRACE("EnumServicesStatusExA() called\n");
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = REnumServicesStatusExA(BindingHandle,
|
||||
(SC_RPC_HANDLE)hSCManager,
|
||||
dwError = REnumServicesStatusExA((SC_RPC_HANDLE)hSCManager,
|
||||
InfoLevel,
|
||||
dwServiceType,
|
||||
dwServiceState,
|
||||
|
@ -1321,12 +1226,9 @@ EnumServicesStatusExW(SC_HANDLE hSCManager,
|
|||
|
||||
TRACE("EnumServicesStatusExW() called\n");
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = REnumServicesStatusExW(BindingHandle,
|
||||
(SC_RPC_HANDLE)hSCManager,
|
||||
dwError = REnumServicesStatusExW((SC_RPC_HANDLE)hSCManager,
|
||||
InfoLevel,
|
||||
dwServiceType,
|
||||
dwServiceState,
|
||||
|
@ -1396,12 +1298,9 @@ GetServiceDisplayNameA(SC_HANDLE hSCManager,
|
|||
if (!lpDisplayName)
|
||||
*lpcchBuffer = 0;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = RGetServiceDisplayNameA(BindingHandle,
|
||||
(SC_RPC_HANDLE)hSCManager,
|
||||
dwError = RGetServiceDisplayNameA((SC_RPC_HANDLE)hSCManager,
|
||||
(LPSTR)lpServiceName,
|
||||
lpDisplayName,
|
||||
lpcchBuffer);
|
||||
|
@ -1444,12 +1343,9 @@ GetServiceDisplayNameW(SC_HANDLE hSCManager,
|
|||
if (!lpDisplayName)
|
||||
*lpcchBuffer = 0;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = RGetServiceDisplayNameW(BindingHandle,
|
||||
(SC_RPC_HANDLE)hSCManager,
|
||||
dwError = RGetServiceDisplayNameW((SC_RPC_HANDLE)hSCManager,
|
||||
(LPWSTR)lpServiceName,
|
||||
lpDisplayName,
|
||||
lpcchBuffer);
|
||||
|
@ -1489,12 +1385,9 @@ GetServiceKeyNameA(SC_HANDLE hSCManager,
|
|||
if (!lpServiceName)
|
||||
*lpcchBuffer = 0;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = RGetServiceKeyNameA(BindingHandle,
|
||||
(SC_RPC_HANDLE)hSCManager,
|
||||
dwError = RGetServiceKeyNameA((SC_RPC_HANDLE)hSCManager,
|
||||
(LPSTR)lpDisplayName,
|
||||
lpServiceName,
|
||||
lpcchBuffer);
|
||||
|
@ -1534,12 +1427,9 @@ GetServiceKeyNameW(SC_HANDLE hSCManager,
|
|||
if (!lpDisplayName)
|
||||
*lpcchBuffer = 0;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = RGetServiceKeyNameW(BindingHandle,
|
||||
(SC_RPC_HANDLE)hSCManager,
|
||||
dwError = RGetServiceKeyNameW((SC_RPC_HANDLE)hSCManager,
|
||||
(LPWSTR)lpDisplayName,
|
||||
lpServiceName,
|
||||
lpcchBuffer);
|
||||
|
@ -1574,13 +1464,10 @@ LockServiceDatabase(SC_HANDLE hSCManager)
|
|||
|
||||
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 @@ OpenSCManagerA(LPCSTR lpMachineName,
|
|||
|
||||
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 @@ OpenSCManagerW(LPCWSTR lpMachineName,
|
|||
|
||||
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 @@ OpenServiceA(SC_HANDLE hSCManager,
|
|||
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 @@ OpenServiceW(SC_HANDLE hSCManager,
|
|||
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 @@ QueryServiceConfigA(SC_HANDLE hService,
|
|||
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 @@ QueryServiceConfigW(SC_HANDLE hService,
|
|||
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 @@ QueryServiceConfig2A(SC_HANDLE hService,
|
|||
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 @@ QueryServiceConfig2W(SC_HANDLE hService,
|
|||
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 @@ QueryServiceLockStatusA(SC_HANDLE hSCManager,
|
|||
|
||||
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 @@ QueryServiceLockStatusW(SC_HANDLE hSCManager,
|
|||
|
||||
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 @@ QueryServiceObjectSecurity(SC_HANDLE hService,
|
|||
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 @@ SetServiceObjectSecurity(SC_HANDLE hService,
|
|||
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 @@ QueryServiceStatus(SC_HANDLE hService,
|
|||
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 @@ QueryServiceStatusEx(SC_HANDLE hService,
|
|||
|
||||
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 @@ StartServiceA(SC_HANDLE hService,
|
|||
{
|
||||
DWORD dwError;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = RStartServiceA(BindingHandle,
|
||||
(SC_RPC_HANDLE)hService,
|
||||
dwError = RStartServiceA((SC_RPC_HANDLE)hService,
|
||||
dwNumServiceArgs,
|
||||
(LPSTRING_PTRSA)lpServiceArgVectors);
|
||||
}
|
||||
|
@ -2530,12 +2372,9 @@ StartServiceW(SC_HANDLE hService,
|
|||
{
|
||||
DWORD dwError;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
dwError = RStartServiceW(BindingHandle,
|
||||
(SC_RPC_HANDLE)hService,
|
||||
dwError = RStartServiceW((SC_RPC_HANDLE)hService,
|
||||
dwNumServiceArgs,
|
||||
(LPSTRING_PTRSW)lpServiceArgVectors);
|
||||
}
|
||||
|
@ -2568,13 +2407,10 @@ UnlockServiceDatabase(SC_LOCK ScLock)
|
|||
|
||||
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 @@ NotifyBootConfigStatus(BOOL BootAcceptable)
|
|||
|
||||
TRACE("NotifyBootConfigStatus()\n");
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
/* Call to services.exe using RPC */
|
||||
dwError = RNotifyBootConfigStatus(BindingHandle,
|
||||
NULL,
|
||||
dwError = RNotifyBootConfigStatus(NULL,
|
||||
BootAcceptable);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
|
|
|
@ -20,8 +20,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi);
|
|||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
VOID HandleBind(VOID);
|
||||
|
||||
typedef struct _ACTIVE_SERVICE
|
||||
{
|
||||
CLIENT_HANDLE hService;
|
||||
|
@ -42,7 +40,6 @@ typedef struct _ACTIVE_SERVICE
|
|||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
extern handle_t BindingHandle;
|
||||
static DWORD dwActiveServiceCount = 0;
|
||||
static PACTIVE_SERVICE lpActiveServices = NULL;
|
||||
|
||||
|
@ -544,13 +541,10 @@ I_ScSetServiceBitsA(SERVICE_STATUS_HANDLE hServiceStatus,
|
|||
{
|
||||
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 @@ I_ScSetServiceBitsW(SERVICE_STATUS_HANDLE hServiceStatus,
|
|||
{
|
||||
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 @@ SetServiceStatus(SERVICE_STATUS_HANDLE hServiceStatus,
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -18,11 +18,11 @@ const unsigned short SC_MAX_ARGUMENTS = 1024;
|
|||
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 @@ typedef struct _STRING_PTRSW {
|
|||
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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* Function 11 */
|
||||
DWORD RChangeServiceConfigW(
|
||||
[in] handle_t BindingHandle,
|
||||
[in] SC_RPC_HANDLE hService,
|
||||
[in] DWORD dwServiceType,
|
||||
[in] DWORD dwStartType,
|
||||
|
@ -394,7 +382,6 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* Function 14 */
|
||||
DWORD REnumServicesStatusW(
|
||||
[in] handle_t BindingHandle,
|
||||
[in] SC_RPC_HANDLE hSCManager,
|
||||
[in] DWORD dwServiceType,
|
||||
[in] DWORD dwServiceState,
|
||||
|
@ -436,7 +421,6 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* Function 23 */
|
||||
DWORD RChangeServiceConfigA(
|
||||
[in] handle_t BindingHandle,
|
||||
[in] SC_RPC_HANDLE hService,
|
||||
[in] DWORD dwServiceType,
|
||||
[in] DWORD dwStartType,
|
||||
|
@ -518,7 +494,6 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* Function 26 */
|
||||
DWORD REnumServicesStatusA(
|
||||
[in] handle_t BindingHandle,
|
||||
[in] SC_RPC_HANDLE hSCManager,
|
||||
[in] DWORD dwServiceType,
|
||||
[in] DWORD dwServiceState,
|
||||
|
@ -560,7 +533,6 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* 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 @@ interface svcctl
|
|||
|
||||
/* Function 51 */
|
||||
DWORD RControlServiceExW(
|
||||
[in] handle_t BindingHandle,
|
||||
[in] SC_RPC_HANDLE hService,
|
||||
[in] DWORD dwControl,
|
||||
[in] DWORD dwInfoLevel/*,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue