mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
Implement I_ScSetServiceBitsA/W and SetServiceBits.
svn path=/trunk/; revision=36200
This commit is contained in:
parent
efe847ad5e
commit
b3bb873fd3
8 changed files with 95 additions and 62 deletions
|
@ -1035,7 +1035,7 @@ DWORD RNotifyBootConfigStatus(
|
|||
|
||||
|
||||
/* Function 10 */
|
||||
DWORD RSetServiceBitsW(
|
||||
DWORD RI_ScSetServiceBitsW(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hServiceStatus,
|
||||
DWORD dwServiceBits,
|
||||
|
@ -2819,7 +2819,7 @@ DWORD RGetServiceKeyNameW(
|
|||
|
||||
|
||||
/* Function 22 */
|
||||
DWORD RSetServiceBitsA(
|
||||
DWORD RI_ScSetServiceBitsA(
|
||||
handle_t BindingHandle,
|
||||
SC_RPC_HANDLE hServiceStatus,
|
||||
DWORD dwServiceBits,
|
||||
|
|
|
@ -307,8 +307,8 @@ GetWindowsAccountDomainSid@12
|
|||
;I_ScIsSecurityProcess
|
||||
;I_ScPnPGetServiceName
|
||||
;I_ScSendTSMessage
|
||||
;I_ScSetServiceBitsA@20
|
||||
;I_ScSetServiceBitsW@20
|
||||
I_ScSetServiceBitsA@20
|
||||
I_ScSetServiceBitsW@20
|
||||
;IdentifyCodeAuthzLevelW
|
||||
ImpersonateAnonymousToken@4
|
||||
ImpersonateLoggedOnUser@4
|
||||
|
|
|
@ -50,6 +50,10 @@ BOOL
|
|||
EvtGetLocalHandle(RPC_BINDING_HANDLE *BindingHandle);
|
||||
RPC_STATUS EvtUnbindLocalHandle(void);
|
||||
|
||||
/* scm.c */
|
||||
DWORD
|
||||
ScmRpcStatusToWinError(RPC_STATUS Status);
|
||||
|
||||
/* Interface to ntmarta.dll **************************************************/
|
||||
|
||||
typedef struct _NTMARTA
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
<file>rpc.c</file>
|
||||
<file>scm.c</file>
|
||||
<file>sctrl.c</file>
|
||||
<file>undoc.c</file>
|
||||
</directory>
|
||||
<directory name="token">
|
||||
<file>privilege.c</file>
|
||||
|
|
|
@ -78,7 +78,7 @@ HandleUnbind(VOID)
|
|||
#endif
|
||||
|
||||
|
||||
static DWORD
|
||||
DWORD
|
||||
ScmRpcStatusToWinError(RPC_STATUS Status)
|
||||
{
|
||||
switch (Status)
|
||||
|
|
|
@ -528,10 +528,88 @@ RegisterServiceCtrlHandlerExW(LPCWSTR lpServiceName,
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* I_ScSetServiceBitsA
|
||||
*
|
||||
* Undocumented
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL STDCALL
|
||||
I_ScSetServiceBitsA(SC_RPC_HANDLE hServiceStatus,
|
||||
DWORD dwServiceBits,
|
||||
BOOL bSetBitsOn,
|
||||
BOOL bUpdateImmediately,
|
||||
LPSTR lpString)
|
||||
{
|
||||
BOOL bResult;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
/* Call to services.exe using RPC */
|
||||
bResult = RI_ScSetServiceBitsA(BindingHandle,
|
||||
(SC_RPC_HANDLE)hServiceStatus,
|
||||
dwServiceBits,
|
||||
bSetBitsOn,
|
||||
bUpdateImmediately,
|
||||
lpString);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
SetLastError(ScmRpcStatusToWinError(RpcExceptionCode()));
|
||||
bResult = FALSE;
|
||||
}
|
||||
_SEH_END;
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* I_ScSetServiceBitsW
|
||||
*
|
||||
* Undocumented
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL STDCALL
|
||||
I_ScSetServiceBitsW(SC_RPC_HANDLE hServiceStatus,
|
||||
DWORD dwServiceBits,
|
||||
BOOL bSetBitsOn,
|
||||
BOOL bUpdateImmediately,
|
||||
LPWSTR lpString)
|
||||
{
|
||||
BOOL bResult;
|
||||
|
||||
HandleBind();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
/* Call to services.exe using RPC */
|
||||
bResult = RI_ScSetServiceBitsW(BindingHandle,
|
||||
(SC_RPC_HANDLE)hServiceStatus,
|
||||
dwServiceBits,
|
||||
bSetBitsOn,
|
||||
bUpdateImmediately,
|
||||
lpString);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
SetLastError(ScmRpcStatusToWinError(RpcExceptionCode()));
|
||||
bResult = FALSE;
|
||||
}
|
||||
_SEH_END;
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetServiceBits
|
||||
*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
BOOL STDCALL
|
||||
SetServiceBits(SERVICE_STATUS_HANDLE hServiceStatus,
|
||||
|
@ -539,8 +617,11 @@ SetServiceBits(SERVICE_STATUS_HANDLE hServiceStatus,
|
|||
BOOL bSetBitsOn,
|
||||
BOOL bUpdateImmediately)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
return I_ScSetServiceBitsW(hServiceStatus,
|
||||
dwServiceBits,
|
||||
bSetBitsOn,
|
||||
bUpdateImmediately,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/advapi32/service/undoc.c
|
||||
* PURPOSE: Undocumented service functions
|
||||
* PROGRAMMER: Emanuele Aliberti
|
||||
* UPDATE HISTORY:
|
||||
* 19990413 EA created
|
||||
* 19990515 EA
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <advapi32.h>
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/**********************************************************************
|
||||
* I_ScSetServiceBitsA
|
||||
*
|
||||
* Undocumented
|
||||
*
|
||||
* Return value unknown.
|
||||
*/
|
||||
DWORD
|
||||
STDCALL
|
||||
I_ScSetServiceBitsA(VOID)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* I_ScSetServiceBitsW
|
||||
*
|
||||
* Undocumented
|
||||
*
|
||||
* Return value unknown.
|
||||
*/
|
||||
DWORD
|
||||
STDCALL
|
||||
I_ScSetServiceBitsW(VOID)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ interface svcctl
|
|||
[in] DWORD BootAcceptable);
|
||||
|
||||
/* Function 10 */
|
||||
DWORD RSetServiceBitsW(
|
||||
DWORD RI_ScSetServiceBitsW(
|
||||
[in] handle_t BindingHandle,
|
||||
[in] SC_RPC_HANDLE hServiceStatus,
|
||||
[in] DWORD dwServiceBits,
|
||||
|
@ -490,7 +490,7 @@ interface svcctl
|
|||
[in, out] DWORD* lpcchBuffer);
|
||||
|
||||
/* Function 22 */
|
||||
DWORD RSetServiceBitsA(
|
||||
DWORD RI_ScSetServiceBitsA(
|
||||
[in] handle_t BindingHandle,
|
||||
[in] SC_RPC_HANDLE hServiceStatus,
|
||||
[in] DWORD dwServiceBits,
|
||||
|
|
Loading…
Reference in a new issue