Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/msiquery.c | 16 ++++++++++++++-- dlls/msi/tests/custom.c | 3 +++ dlls/msi/winemsi.idl | 1 + 3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index 6eddf7a..682881e 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -440,8 +440,15 @@ UINT WINAPI MsiViewClose(MSIHANDLE hView) TRACE("%d\n", hView );
query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW ); - if( !query ) - return ERROR_INVALID_HANDLE; + if (!query) + { + MSIHANDLE remote; + + if (!(remote = msi_get_remote(hView))) + return ERROR_INVALID_HANDLE; + + return remote_ViewClose(remote); + }
ret = MSI_ViewClose( query ); msiobj_release( &query->hdr ); @@ -1055,6 +1062,11 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( return r; }
+UINT __cdecl remote_ViewClose(MSIHANDLE view) +{ + return MsiViewClose(view); +} + UINT __cdecl remote_ViewExecute(MSIHANDLE view, struct wire_record *remote_rec) { MSIHANDLE rec = 0; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 479cb93..3d7ebb9 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -316,6 +316,9 @@ static void test_db(MSIHANDLE hinst) ok(hinst, r == ERROR_NO_MORE_ITEMS, "got %u\n", r); ok(hinst, !rec2, "got %u\n", rec2);
+ r = MsiViewClose(view); + ok(hinst, !r, "got %u\n", r); + r = MsiCloseHandle(view); ok(hinst, !r, "got %u\n", r);
diff --git a/dlls/msi/winemsi.idl b/dlls/msi/winemsi.idl index b892f34..74b5923 100644 --- a/dlls/msi/winemsi.idl +++ b/dlls/msi/winemsi.idl @@ -56,6 +56,7 @@ struct wire_record { ] interface IWineMsiRemote { + UINT remote_ViewClose( [in] MSIHANDLE view ); UINT remote_ViewExecute( [in] MSIHANDLE view, [in, unique] struct wire_record *record ); UINT remote_ViewFetch( [in] MSIHANDLE view, [out] struct wire_record **record );