Commit d34b1c23 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Implement MsiSequenceA/W.

parent 329d017d
......@@ -690,6 +690,40 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
return rc;
}
UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode )
{
MSIQUERY * view;
UINT r;
static const WCHAR query[] =
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
'`','%','s','`',
' ','W','H','E','R','E',' ',
'`','S','e','q','u','e','n','c','e','`',' ',
'>',' ','0',' ','O','R','D','E','R',' ','B','Y',' ',
'`','S','e','q','u','e','n','c','e','`',0};
iterate_action_param iap;
/*
* FIXME: probably should be checking UILevel in the
* ACTION_PerformUIAction/ACTION_PerformAction
* rather than saving the UI level here. Those
* two functions can be merged too.
*/
iap.package = package;
iap.UI = TRUE;
TRACE("%p %s %i\n", package, debugstr_w(szTable), iSequenceMode );
r = MSI_OpenQuery( package->db, &view, query, szTable );
if (r == ERROR_SUCCESS)
{
r = MSI_IterateRecords( view, NULL, ITERATE_Actions, &iap );
msiobj_release(&view->hdr);
}
return r;
}
static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package, BOOL UIran)
{
MSIQUERY * view;
......
......@@ -80,19 +80,40 @@ UINT WINAPI MsiDoActionW( MSIHANDLE hInstall, LPCWSTR szAction )
/***********************************************************************
* MsiSequenceA (MSI.@)
*/
UINT WINAPI MsiSequenceA( MSIHANDLE hInstall, LPCSTR szAction, INT iSequenceMode )
UINT WINAPI MsiSequenceA( MSIHANDLE hInstall, LPCSTR szTable, INT iSequenceMode )
{
TRACE("%s\n", debugstr_a(szAction));
return ERROR_CALL_NOT_IMPLEMENTED;
LPWSTR szwTable;
UINT ret;
TRACE("%s\n", debugstr_a(szTable));
szwTable = strdupAtoW(szTable);
if (szTable && !szwTable)
return ERROR_FUNCTION_FAILED;
ret = MsiSequenceW( hInstall, szwTable, iSequenceMode );
msi_free( szwTable );
return ret;
}
/***********************************************************************
* MsiSequenceW (MSI.@)
*/
UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szAction, INT iSequenceMode )
UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT iSequenceMode )
{
TRACE("%s\n", debugstr_w(szAction));
return ERROR_CALL_NOT_IMPLEMENTED;
MSIPACKAGE *package;
UINT ret;
TRACE("%s\n", debugstr_w(szTable));
package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE );
if (!package)
return ERROR_INVALID_HANDLE;
ret = MSI_Sequence( package, szTable, iSequenceMode );
msiobj_release( &package->hdr );
return ret;
}
static UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz )
......
......@@ -305,6 +305,7 @@ extern UINT read_raw_stream_data( MSIDATABASE*, LPCWSTR stname,
extern UINT ACTION_DoTopLevelINSTALL( MSIPACKAGE *, LPCWSTR, LPCWSTR, LPCWSTR );
extern void ACTION_free_package_structures( MSIPACKAGE* );
extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR);
extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode );
/* record internals */
extern UINT MSI_RecordSetIStream( MSIRECORD *, unsigned int, IStream *);
......
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