mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 23:33:24 +08:00
[WINESYNC] 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> wine commit id 1723536058c73b71894f60ab2c030e78948abe45 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -2525,10 +2525,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,
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user