https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ae286278fcb7f2dfeee03…
commit ae286278fcb7f2dfeee039ef5f70a15024c7d945
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:11:54 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:37 2022 +0100
[WINESYNC] msi: Make MsiViewClose() RPC-compatible.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 9ab15d4edea1ab0c80f9d3ea15d9855aba2f4880 by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/msiquery.c | 16 ++++++++++++++--
dll/win32/msi/winemsi.idl | 1 +
modules/rostests/winetests/msi/custom.c | 3 +++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c
index 6eddf7a8219..682881ee716 100644
--- a/dll/win32/msi/msiquery.c
+++ b/dll/win32/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/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl
index b892f34bfea..74b59234793 100644
--- a/dll/win32/msi/winemsi.idl
+++ b/dll/win32/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 );
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index 479cb930de4..3d7ebb99f34 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/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);