mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:52:56 +00:00
[SERVICES] Implement RI_ScSetServiceBitsA/W
- RI_ScSetServiceBitsA: Just call RI_ScSetServiceBitsW. - RI_ScSetServiceBitsW: Store the service bits in the service list entry. TODO: Merge all service bits in a global variable and pass it to the server service. Maybe use netapi.I_NetServerSetServiceBits(Ex)?
This commit is contained in:
parent
73f799629b
commit
fd090c6ca1
2 changed files with 48 additions and 4 deletions
|
@ -1860,8 +1860,41 @@ RI_ScSetServiceBitsW(
|
||||||
int bUpdateImmediately,
|
int bUpdateImmediately,
|
||||||
wchar_t *lpString)
|
wchar_t *lpString)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PSERVICE pService;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
||||||
|
DPRINT("RI_ScSetServiceBitsW(%p %lx %d %d %S)\n",
|
||||||
|
hServiceStatus, dwServiceBits, bSetBitsOn,
|
||||||
|
bUpdateImmediately, lpString);
|
||||||
|
|
||||||
|
if (ScmShutdown)
|
||||||
|
return ERROR_SHUTDOWN_IN_PROGRESS;
|
||||||
|
|
||||||
|
if (lpString != NULL)
|
||||||
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
if (hServiceStatus == 0)
|
||||||
|
{
|
||||||
|
DPRINT("hServiceStatus == NULL!\n");
|
||||||
|
return ERROR_INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: Validate the status handle
|
||||||
|
pService = (PSERVICE)hServiceStatus;
|
||||||
|
|
||||||
|
if (bSetBitsOn)
|
||||||
|
{
|
||||||
|
DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
|
||||||
|
pService->dwServiceBits |= dwServiceBits;
|
||||||
|
DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DPRINT("Old service bits: %08lx\n", pService->dwServiceBits);
|
||||||
|
pService->dwServiceBits &= ~dwServiceBits;
|
||||||
|
DPRINT("New service bits: %08lx\n", pService->dwServiceBits);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3335,8 +3368,17 @@ RI_ScSetServiceBitsA(
|
||||||
int bUpdateImmediately,
|
int bUpdateImmediately,
|
||||||
char *lpString)
|
char *lpString)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
if (ScmShutdown)
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
return ERROR_SHUTDOWN_IN_PROGRESS;
|
||||||
|
|
||||||
|
if (lpString != NULL)
|
||||||
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
return RI_ScSetServiceBitsW(hServiceStatus,
|
||||||
|
dwServiceBits,
|
||||||
|
bSetBitsOn,
|
||||||
|
bUpdateImmediately,
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,8 @@ typedef struct _SERVICE
|
||||||
DWORD dwErrorControl;
|
DWORD dwErrorControl;
|
||||||
DWORD dwTag;
|
DWORD dwTag;
|
||||||
|
|
||||||
|
DWORD dwServiceBits;
|
||||||
|
|
||||||
ULONG Flags;
|
ULONG Flags;
|
||||||
|
|
||||||
PSECURITY_DESCRIPTOR pSecurityDescriptor;
|
PSECURITY_DESCRIPTOR pSecurityDescriptor;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue