advapi32: Correctly translate SERVICE_REQUIRED_PRIVILEGES_INFO to RPC.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e3796fab3c
commit
3b8ec3046a
|
@ -2448,6 +2448,7 @@ BOOL WINAPI ChangeServiceConfig2A( SC_HANDLE hService, DWORD dwInfoLevel,
|
|||
BOOL WINAPI ChangeServiceConfig2W( SC_HANDLE hService, DWORD dwInfoLevel,
|
||||
LPVOID lpInfo)
|
||||
{
|
||||
SERVICE_RPC_REQUIRED_PRIVILEGES_INFO rpc_privinfo;
|
||||
DWORD err;
|
||||
|
||||
__TRY
|
||||
|
@ -2455,6 +2456,18 @@ BOOL WINAPI ChangeServiceConfig2W( SC_HANDLE hService, DWORD dwInfoLevel,
|
|||
SC_RPC_CONFIG_INFOW info;
|
||||
|
||||
info.dwInfoLevel = dwInfoLevel;
|
||||
if (dwInfoLevel == SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO)
|
||||
{
|
||||
SERVICE_REQUIRED_PRIVILEGES_INFOW *privinfo = lpInfo;
|
||||
WCHAR *p;
|
||||
|
||||
for (p = privinfo->pmszRequiredPrivileges; *p; p += strlenW(p) + 1);
|
||||
rpc_privinfo.cbRequiredPrivileges =
|
||||
(p - privinfo->pmszRequiredPrivileges + 1) * sizeof(WCHAR);
|
||||
rpc_privinfo.pRequiredPrivileges = (BYTE *)privinfo->pmszRequiredPrivileges;
|
||||
info.u.privinfo = &rpc_privinfo;
|
||||
}
|
||||
else
|
||||
info.u.descr = lpInfo;
|
||||
err = svcctl_ChangeServiceConfig2W( hService, info );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue