Commit 2b4bf44b authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Add an internal MSI_ViewModify.

parent 1cdc0570
...@@ -619,6 +619,7 @@ extern UINT MSI_ViewExecute( MSIQUERY*, MSIRECORD * ); ...@@ -619,6 +619,7 @@ extern UINT MSI_ViewExecute( MSIQUERY*, MSIRECORD * );
extern UINT MSI_ViewFetch( MSIQUERY*, MSIRECORD ** ); extern UINT MSI_ViewFetch( MSIQUERY*, MSIRECORD ** );
extern UINT MSI_ViewClose( MSIQUERY* ); extern UINT MSI_ViewClose( MSIQUERY* );
extern UINT MSI_ViewGetColumnInfo(MSIQUERY *, MSICOLINFO, MSIRECORD **); extern UINT MSI_ViewGetColumnInfo(MSIQUERY *, MSICOLINFO, MSIRECORD **);
extern UINT MSI_ViewModify( MSIQUERY *, MSIMODIFY, MSIRECORD * );
extern UINT VIEW_find_column( MSIVIEW *, LPCWSTR, UINT * ); extern UINT VIEW_find_column( MSIVIEW *, LPCWSTR, UINT * );
......
...@@ -552,10 +552,23 @@ UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hR ...@@ -552,10 +552,23 @@ UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hR
return r; return r;
} }
UINT MSI_ViewModify( MSIQUERY *query, MSIMODIFY mode, MSIRECORD *rec )
{
MSIVIEW *view = NULL;
if ( !query || !rec )
return ERROR_INVALID_HANDLE;
view = query->view;
if ( !view || !view->ops->modify)
return ERROR_FUNCTION_FAILED;
return view->ops->modify( view, mode, rec );
}
UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode, UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode,
MSIHANDLE hRecord) MSIHANDLE hRecord)
{ {
MSIVIEW *view = NULL;
MSIQUERY *query = NULL; MSIQUERY *query = NULL;
MSIRECORD *rec = NULL; MSIRECORD *rec = NULL;
UINT r = ERROR_FUNCTION_FAILED; UINT r = ERROR_FUNCTION_FAILED;
...@@ -566,23 +579,9 @@ UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode, ...@@ -566,23 +579,9 @@ UINT WINAPI MsiViewModify( MSIHANDLE hView, MSIMODIFY eModifyMode,
if( !query ) if( !query )
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
view = query->view;
if( !view )
goto out;
if( !view->ops->modify )
goto out;
rec = msihandle2msiinfo( hRecord, MSIHANDLETYPE_RECORD ); rec = msihandle2msiinfo( hRecord, MSIHANDLETYPE_RECORD );
if( !rec ) r = MSI_ViewModify( query, eModifyMode, rec );
{
r = ERROR_INVALID_HANDLE;
goto out;
}
r = view->ops->modify( view, eModifyMode, rec );
out:
msiobj_release( &query->hdr ); msiobj_release( &query->hdr );
if( rec ) if( rec )
msiobj_release( &rec->hdr ); msiobj_release( &rec->hdr );
......
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