Commit 676376d1 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi: Make MsiSequence() RPC-compatible.

parent c49abc8c
......@@ -117,33 +117,18 @@ UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT iSequenceMode
TRACE("%s, %d\n", debugstr_w(szTable), iSequenceMode);
if (!szTable)
return ERROR_INVALID_PARAMETER;
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE );
if (!package)
{
MSIHANDLE remote;
HRESULT hr;
BSTR table;
if (!(remote = msi_get_remote(hInstall)))
return ERROR_INVALID_HANDLE;
table = SysAllocString( szTable );
if (!table)
return ERROR_OUTOFMEMORY;
hr = remote_Sequence(remote, table, iSequenceMode);
SysFreeString( table );
if (FAILED(hr))
{
if (HRESULT_FACILITY(hr) == FACILITY_WIN32)
return HRESULT_CODE(hr);
return ERROR_FUNCTION_FAILED;
}
return ERROR_SUCCESS;
return remote_Sequence(remote, szTable, iSequenceMode);
}
ret = MSI_Sequence( package, szTable );
msiobj_release( &package->hdr );
......
......@@ -2469,10 +2469,9 @@ UINT __cdecl remote_DoAction(MSIHANDLE hinst, LPCWSTR action)
return MsiDoActionW(hinst, action);
}
HRESULT __cdecl remote_Sequence(MSIHANDLE hinst, BSTR table, int sequence)
UINT __cdecl remote_Sequence(MSIHANDLE hinst, LPCWSTR table, int sequence)
{
UINT r = MsiSequenceW(hinst, table, sequence);
return HRESULT_FROM_WIN32(r);
return MsiSequenceW(hinst, table, sequence);
}
HRESULT __cdecl remote_GetTargetPath(MSIHANDLE hinst, BSTR folder, BSTR value, DWORD *size)
......
......@@ -437,6 +437,13 @@ static void test_doaction(MSIHANDLE hinst)
r = MsiDoActionA(hinst, "nested1");
ok(hinst, !r, "got %u\n", r);
check_prop(hinst, "nested", "2");
r = MsiSequenceA(hinst, NULL, 0);
ok(hinst, r == ERROR_INVALID_PARAMETER, "got %u\n", r);
r = MsiSequenceA(hinst, "TestSequence", 0);
ok(hinst, !r, "got %u\n", r);
check_prop(hinst, "nested", "1");
}
UINT WINAPI nested(MSIHANDLE hinst)
......
......@@ -708,6 +708,12 @@ static const CHAR ca1_custom_action_dat[] = "Action\tType\tSource\tTarget\n"
"maintest\t1\tcustom.dll\tmain_test\n"
"testretval\t1\tcustom.dll\ttest_retval\n";
static const CHAR ca1_test_seq_dat[] = "Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"TestSequence\tAction\n"
"nested1\t\t1\n"
"nested51\t\t2\n";
static const CHAR ca51_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
......@@ -1706,6 +1712,7 @@ static const msi_table ca1_tables[] =
ADD_TABLE(property),
ADD_TABLE(ca1_install_exec_seq),
ADD_TABLE(ca1_custom_action),
ADD_TABLE(ca1_test_seq),
};
static const msi_table ca51_tables[] =
......
......@@ -75,7 +75,7 @@ interface IWineMsiRemote
UINT remote_SetProperty( [in] MSIHANDLE hinst, [in, string, unique] LPCWSTR property, [in, string, unique] LPCWSTR value );
int remote_ProcessMessage( [in] MSIHANDLE hinst, [in] INSTALLMESSAGE message, [in] struct wire_record *record );
UINT remote_DoAction( [in] MSIHANDLE hinst, [in, string] LPCWSTR action );
HRESULT remote_Sequence( [in] MSIHANDLE hinst, [in] BSTR table, [in] int sequence );
UINT remote_Sequence( [in] MSIHANDLE hinst, [in, string] LPCWSTR table, [in] int sequence );
HRESULT remote_GetTargetPath( [in] MSIHANDLE hinst, [in] BSTR folder, [out, size_is(*size)] BSTR value, [in, out] DWORD *size );
HRESULT remote_SetTargetPath( [in] MSIHANDLE hinst, [in] BSTR folder, [in] BSTR value );
HRESULT remote_GetSourcePath( [in] MSIHANDLE hinst, [in] BSTR folder, [out, size_is(*size)] BSTR value, [in, out] DWORD *size );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment