https://git.reactos.org/?p=reactos.git;a=commitdiff;h=115d04ba20272d1ec1a91…
commit 115d04ba20272d1ec1a9108afc75ec3855581863
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 01:21:39 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:16 2022 +0100
[WINESYNC] msi: Return ERROR_INVALID_HANDLE when MsiDatabaseApplyTransform() is called
from a custom action.
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 ed5f4bd14f5cece4bca63918b924606a09a3300d by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/msiquery.c | 14 ++------------
modules/rostests/winetests/msi/custom.c | 2 +-
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c
index 50cc97745b6..9f4c5975306 100644
--- a/dll/win32/msi/msiquery.c
+++ b/dll/win32/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/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index 9e9e2bf938a..526c4a211d2 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/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);