mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
- CreateServiceW: Calculate the Dependency length.
- Implement NotifyBootConfigStatus. svn path=/trunk/; revision=18485
This commit is contained in:
parent
68b164341e
commit
94d46bd214
2 changed files with 52 additions and 7 deletions
|
@ -416,7 +416,7 @@ MakeAbsoluteSD@44
|
||||||
;MakeAbsoluteSD2
|
;MakeAbsoluteSD2
|
||||||
MakeSelfRelativeSD@12
|
MakeSelfRelativeSD@12
|
||||||
MapGenericMask@8=NTDLL.RtlMapGenericMask
|
MapGenericMask@8=NTDLL.RtlMapGenericMask
|
||||||
;NotifyBootConfigStatus@4
|
NotifyBootConfigStatus@4
|
||||||
NotifyChangeEventLog@8
|
NotifyChangeEventLog@8
|
||||||
ObjectCloseAuditAlarmA@12
|
ObjectCloseAuditAlarmA@12
|
||||||
ObjectCloseAuditAlarmW@12
|
ObjectCloseAuditAlarmW@12
|
||||||
|
|
|
@ -263,13 +263,31 @@ CreateServiceW(SC_HANDLE hSCManager,
|
||||||
SC_HANDLE hService = NULL;
|
SC_HANDLE hService = NULL;
|
||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
HKEY hEnumKey, hKey;
|
HKEY hEnumKey, hKey;
|
||||||
|
DWORD dwDependenciesLength = 0;
|
||||||
|
DWORD dwLength;
|
||||||
|
LPWSTR lpStr;
|
||||||
|
|
||||||
DPRINT1("CreateServiceW() called\n");
|
DPRINT1("CreateServiceW() called\n");
|
||||||
|
|
||||||
|
/* Calculate the Dependencies length*/
|
||||||
|
if (lpDependencies != NULL)
|
||||||
|
{
|
||||||
|
lpStr = (LPWSTR)lpDependencies;
|
||||||
|
while (*lpStr)
|
||||||
|
{
|
||||||
|
dwLength = wcslen(lpStr) + 1;
|
||||||
|
dwDependenciesLength += dwLength;
|
||||||
|
lpStr = lpStr + dwLength;
|
||||||
|
}
|
||||||
|
dwDependenciesLength++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME: Encrypt the password */
|
||||||
|
|
||||||
|
#if 0
|
||||||
HandleBind();
|
HandleBind();
|
||||||
|
|
||||||
/* Call to services.exe using RPC */
|
/* Call to services.exe using RPC */
|
||||||
#if 0
|
|
||||||
dwError = ScmrCreateServiceW(BindingHandle,
|
dwError = ScmrCreateServiceW(BindingHandle,
|
||||||
(unsigned int)hSCManager,
|
(unsigned int)hSCManager,
|
||||||
(LPWSTR)lpServiceName,
|
(LPWSTR)lpServiceName,
|
||||||
|
@ -281,8 +299,8 @@ CreateServiceW(SC_HANDLE hSCManager,
|
||||||
(LPWSTR)lpBinaryPathName,
|
(LPWSTR)lpBinaryPathName,
|
||||||
(LPWSTR)lpLoadOrderGroup,
|
(LPWSTR)lpLoadOrderGroup,
|
||||||
lpdwTagId,
|
lpdwTagId,
|
||||||
NULL, /* FIXME: lpDependencies */
|
lpDependencies,
|
||||||
0, /* FIXME: dwDependenciesLength */
|
dwDependenciesLength,
|
||||||
(LPWSTR)lpServiceStartName,
|
(LPWSTR)lpServiceStartName,
|
||||||
NULL, /* FIXME: lpPassword */
|
NULL, /* FIXME: lpPassword */
|
||||||
0, /* FIXME: dwPasswordLength */
|
0, /* FIXME: dwPasswordLength */
|
||||||
|
@ -991,9 +1009,7 @@ UnlockServiceDatabase(SC_LOCK ScLock)
|
||||||
{
|
{
|
||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
#if 0
|
DPRINT("UnlockServiceDatabase(%x)\n", ScLock);
|
||||||
DPRINT("UnlockServiceDatabase(%x)\n", hSCManager);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HandleBind();
|
HandleBind();
|
||||||
|
|
||||||
|
@ -1011,11 +1027,40 @@ UnlockServiceDatabase(SC_LOCK ScLock)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* NotifyBootConfigStatus
|
||||||
|
*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
BOOL STDCALL
|
||||||
|
NotifyBootConfigStatus(BOOL BootAcceptable)
|
||||||
|
{
|
||||||
|
DWORD dwError;
|
||||||
|
|
||||||
|
DPRINT1("NotifyBootConfigStatus()\n");
|
||||||
|
|
||||||
|
HandleBind();
|
||||||
|
|
||||||
|
/* Call to services.exe using RPC */
|
||||||
|
dwError = ScmrNotifyBootConfigStatus(BindingHandle,
|
||||||
|
BootAcceptable);
|
||||||
|
if (dwError != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
DPRINT1("NotifyBootConfigStatus() failed (Error %lu)\n", dwError);
|
||||||
|
SetLastError(dwError);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len)
|
void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len)
|
||||||
{
|
{
|
||||||
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
|
void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, ptr);
|
HeapFree(GetProcessHeap(), 0, ptr);
|
||||||
|
|
Loading…
Reference in a new issue