Zebediah Figura : msi: Return ERROR_INVALID_HANDLE when MsiDatabaseApplyTransform() is called from a custom action.

Alexandre Julliard julliard at winehq.org
Tue Mar 26 16:43:13 CDT 2019


Module: wine
Branch: master
Commit: ed5f4bd14f5cece4bca63918b924606a09a3300d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ed5f4bd14f5cece4bca63918b924606a09a3300d

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Mar 25 22:42:02 2019 -0500

msi: Return ERROR_INVALID_HANDLE when MsiDatabaseApplyTransform() is called from a custom action.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msi/msiquery.c     | 14 ++------------
 dlls/msi/tests/custom.c |  2 +-
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c
index bea08c2..862805f 100644
--- a/dlls/msi/msiquery.c
+++ b/dlls/msi/msiquery.c
@@ -884,18 +884,8 @@ UINT WINAPI MsiDatabaseApplyTransformW( MSIHANDLE hdb, const WCHAR *transform, i
 
     if (error_cond) FIXME( "ignoring error conditions\n" );
 
-    db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE );
-    if (!db)
-    {
-        MSIHANDLE remote;
-
-        if (!(remote = msi_get_remote(hdb)))
-            return ERROR_INVALID_HANDLE;
-
-        WARN("MsiDatabaseApplyTransform not allowed during a custom action!\n");
-
-        return ERROR_SUCCESS;
-    }
+    if (!(db = msihandle2msiinfo(hdb, MSIHANDLETYPE_DATABASE)))
+        return ERROR_INVALID_HANDLE;
 
     r = MSI_DatabaseApplyTransformW( db, transform, error_cond );
     msiobj_release( &db->hdr );
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index 9e9e2bf..526c4a2 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1128,7 +1128,7 @@ static void test_invalid_functions(MSIHANDLE hinst)
     todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
 
     r = MsiDatabaseApplyTransformA(db, "bogus.mst", 0);
-    todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
+    ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
 
     r = MsiCreateTransformSummaryInfoA(db, db, "bogus.mst", 0, 0);
     todo_wine ok(hinst, r == ERROR_INSTALL_PACKAGE_OPEN_FAILED, "got %u\n", r);




More information about the wine-cvs mailing list