msi: Make MsiSetMode() RPC-compatible.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9091c3dcf2
commit
1723536058
|
@ -644,22 +644,11 @@ UINT WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState)
|
|||
if (!package)
|
||||
{
|
||||
MSIHANDLE remote;
|
||||
HRESULT hr;
|
||||
|
||||
if (!(remote = msi_get_remote(hInstall)))
|
||||
return FALSE;
|
||||
|
||||
hr = remote_SetMode(remote, iRunMode, fState);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
|
||||
return HRESULT_CODE(hr);
|
||||
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
return remote_SetMode(remote, iRunMode, fState);
|
||||
}
|
||||
|
||||
switch (iRunMode)
|
||||
|
|
|
@ -2518,10 +2518,9 @@ BOOL __cdecl remote_GetMode(MSIHANDLE hinst, MSIRUNMODE mode)
|
|||
return MsiGetMode(hinst, mode);
|
||||
}
|
||||
|
||||
HRESULT __cdecl remote_SetMode(MSIHANDLE hinst, MSIRUNMODE mode, BOOL state)
|
||||
UINT __cdecl remote_SetMode(MSIHANDLE hinst, MSIRUNMODE mode, BOOL state)
|
||||
{
|
||||
UINT r = MsiSetMode(hinst, mode, state);
|
||||
return HRESULT_FROM_WIN32(r);
|
||||
return MsiSetMode(hinst, mode, state);
|
||||
}
|
||||
|
||||
HRESULT __cdecl remote_GetFeatureState(MSIHANDLE hinst, BSTR feature,
|
||||
|
|
|
@ -642,6 +642,14 @@ static void test_targetpath(MSIHANDLE hinst)
|
|||
ok(hinst, sz == srcsz, "got size %u\n", sz);
|
||||
}
|
||||
|
||||
static void test_mode(MSIHANDLE hinst)
|
||||
{
|
||||
UINT r;
|
||||
|
||||
r = MsiSetMode(hinst, MSIRUNMODE_REBOOTATEND, FALSE);
|
||||
ok(hinst, !r, "got %u\n", r);
|
||||
}
|
||||
|
||||
/* Main test. Anything that doesn't depend on a specific install configuration
|
||||
* or have undesired side effects should go here. */
|
||||
UINT WINAPI main_test(MSIHANDLE hinst)
|
||||
|
@ -669,6 +677,7 @@ UINT WINAPI main_test(MSIHANDLE hinst)
|
|||
test_db(hinst);
|
||||
test_doaction(hinst);
|
||||
test_targetpath(hinst);
|
||||
test_mode(hinst);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ interface IWineMsiRemote
|
|||
UINT remote_SetTargetPath( [in] MSIHANDLE hinst, [in, string] LPCWSTR folder, [in, string] LPCWSTR value );
|
||||
UINT remote_GetSourcePath( [in] MSIHANDLE hinst, [in, string] LPCWSTR folder, [out, string] LPWSTR *value );
|
||||
BOOL remote_GetMode( [in] MSIHANDLE hinst, [in] MSIRUNMODE mode );
|
||||
HRESULT remote_SetMode( [in] MSIHANDLE hinst, [in] MSIRUNMODE mode, [in] BOOL state );
|
||||
UINT remote_SetMode( [in] MSIHANDLE hinst, [in] MSIRUNMODE mode, [in] BOOL state );
|
||||
HRESULT remote_GetFeatureState( [in] MSIHANDLE hinst, [in] BSTR feature, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
|
||||
HRESULT remote_SetFeatureState( [in] MSIHANDLE hinst, [in] BSTR feature, [in] INSTALLSTATE state );
|
||||
HRESULT remote_GetComponentState( [in] MSIHANDLE hinst, [in] BSTR component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
|
||||
|
|
Loading…
Reference in New Issue