mirror of
https://github.com/reactos/wine.git
synced 2025-01-19 02:02:18 +00:00
advapi32: Forward to CreateServiceWOW64W() when appropriate.
This commit is contained in:
parent
0f80d4b619
commit
daf0af4313
@ -1057,11 +1057,22 @@ CreateServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
|
||||
|
||||
__TRY
|
||||
{
|
||||
err = svcctl_CreateServiceW(hSCManager, lpServiceName,
|
||||
lpDisplayName, dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl,
|
||||
lpBinaryPathName, lpLoadOrderGroup, lpdwTagId, (const BYTE*)lpDependencies,
|
||||
multisz_cb(lpDependencies), lpServiceStartName, (const BYTE*)lpPassword, passwdlen,
|
||||
(SC_RPC_HANDLE *)&handle);
|
||||
BOOL is_wow64;
|
||||
|
||||
IsWow64Process(GetCurrentProcess(), &is_wow64);
|
||||
|
||||
if (is_wow64)
|
||||
err = svcctl_CreateServiceWOW64W(hSCManager, lpServiceName,
|
||||
lpDisplayName, dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl,
|
||||
lpBinaryPathName, lpLoadOrderGroup, lpdwTagId, (const BYTE*)lpDependencies,
|
||||
multisz_cb(lpDependencies), lpServiceStartName, (const BYTE*)lpPassword, passwdlen,
|
||||
(SC_RPC_HANDLE *)&handle);
|
||||
else
|
||||
err = svcctl_CreateServiceW(hSCManager, lpServiceName,
|
||||
lpDisplayName, dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl,
|
||||
lpBinaryPathName, lpLoadOrderGroup, lpdwTagId, (const BYTE*)lpDependencies,
|
||||
multisz_cb(lpDependencies), lpServiceStartName, (const BYTE*)lpPassword, passwdlen,
|
||||
(SC_RPC_HANDLE *)&handle);
|
||||
}
|
||||
__EXCEPT(rpc_filter)
|
||||
{
|
||||
|
@ -463,7 +463,7 @@ static DWORD parse_dependencies(const WCHAR *dependencies, struct service_entry
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
DWORD __cdecl svcctl_CreateServiceW(
|
||||
static DWORD create_serviceW(
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPCWSTR lpServiceName,
|
||||
LPCWSTR lpDisplayName,
|
||||
@ -479,7 +479,8 @@ DWORD __cdecl svcctl_CreateServiceW(
|
||||
LPCWSTR lpServiceStartName,
|
||||
const BYTE *lpPassword,
|
||||
DWORD dwPasswordSize,
|
||||
SC_RPC_HANDLE *phService)
|
||||
SC_RPC_HANDLE *phService,
|
||||
BOOL is_wow64)
|
||||
{
|
||||
struct service_entry *entry, *found;
|
||||
struct sc_manager_handle *manager;
|
||||
@ -562,6 +563,30 @@ DWORD __cdecl svcctl_CreateServiceW(
|
||||
return create_handle_for_service(entry, dwDesiredAccess, phService);
|
||||
}
|
||||
|
||||
DWORD __cdecl svcctl_CreateServiceW(
|
||||
SC_RPC_HANDLE hSCManager,
|
||||
LPCWSTR lpServiceName,
|
||||
LPCWSTR lpDisplayName,
|
||||
DWORD dwDesiredAccess,
|
||||
DWORD dwServiceType,
|
||||
DWORD dwStartType,
|
||||
DWORD dwErrorControl,
|
||||
LPCWSTR lpBinaryPathName,
|
||||
LPCWSTR lpLoadOrderGroup,
|
||||
DWORD *lpdwTagId,
|
||||
const BYTE *lpDependencies,
|
||||
DWORD dwDependenciesSize,
|
||||
LPCWSTR lpServiceStartName,
|
||||
const BYTE *lpPassword,
|
||||
DWORD dwPasswordSize,
|
||||
SC_RPC_HANDLE *phService)
|
||||
{
|
||||
WINE_TRACE("(%s, %s, 0x%x, %s)\n", wine_dbgstr_w(lpServiceName), wine_dbgstr_w(lpDisplayName), dwDesiredAccess, wine_dbgstr_w(lpBinaryPathName));
|
||||
return create_serviceW(hSCManager, lpServiceName, lpDisplayName, dwDesiredAccess, dwServiceType, dwStartType,
|
||||
dwErrorControl, lpBinaryPathName, lpLoadOrderGroup, lpdwTagId, lpDependencies, dwDependenciesSize, lpServiceStartName,
|
||||
lpPassword, dwPasswordSize, phService, FALSE);
|
||||
}
|
||||
|
||||
DWORD __cdecl svcctl_DeleteService(
|
||||
SC_RPC_HANDLE hService)
|
||||
{
|
||||
@ -1521,8 +1546,9 @@ DWORD __cdecl svcctl_CreateServiceWOW64W(
|
||||
DWORD password_size,
|
||||
SC_RPC_HANDLE *service)
|
||||
{
|
||||
WINE_FIXME("\n");
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
WINE_TRACE("(%s, %s, 0x%x, %s)\n", wine_dbgstr_w(servicename), wine_dbgstr_w(displayname), accessmask, wine_dbgstr_w(imagepath));
|
||||
return create_serviceW(scmanager, servicename, displayname, accessmask, service_type, start_type, error_control, imagepath,
|
||||
loadordergroup, tagid, dependencies, depend_size, start_name, password, password_size, service, TRUE);
|
||||
}
|
||||
|
||||
DWORD __cdecl svcctl_unknown46(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user