Implement MsiSequenceA/W.
This commit is contained in:
parent
329d017db3
commit
d34b1c23a2
|
@ -690,6 +690,40 @@ static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
|
||||||
return rc;
|
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)
|
static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package, BOOL UIran)
|
||||||
{
|
{
|
||||||
MSIQUERY * view;
|
MSIQUERY * view;
|
||||||
|
|
|
@ -80,19 +80,40 @@ UINT WINAPI MsiDoActionW( MSIHANDLE hInstall, LPCWSTR szAction )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* MsiSequenceA (MSI.@)
|
* 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));
|
LPWSTR szwTable;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
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.@)
|
* 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));
|
MSIPACKAGE *package;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
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 )
|
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 UINT ACTION_DoTopLevelINSTALL( MSIPACKAGE *, LPCWSTR, LPCWSTR, LPCWSTR );
|
||||||
extern void ACTION_free_package_structures( MSIPACKAGE* );
|
extern void ACTION_free_package_structures( MSIPACKAGE* );
|
||||||
extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR);
|
extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR);
|
||||||
|
extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode );
|
||||||
|
|
||||||
/* record internals */
|
/* record internals */
|
||||||
extern UINT MSI_RecordSetIStream( MSIRECORD *, unsigned int, IStream *);
|
extern UINT MSI_RecordSetIStream( MSIRECORD *, unsigned int, IStream *);
|
||||||
|
|
Loading…
Reference in New Issue