https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b720e4c0e237911235a48…
commit b720e4c0e237911235a482bcf7a1b840d1d98e19
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 01:21:42 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:17 2022 +0100
[WINESYNC] msi: Return ERROR_INVALID_HANDLE when MsiOpenPackage() 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 b2d3567c1b4846905f01612d8f499f45ed9d24ac by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/package.c | 14 ++------------
modules/rostests/winetests/msi/custom.c | 2 +-
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c
index e2334895931..a634a101961 100644
--- a/dll/win32/msi/package.c
+++ b/dll/win32/msi/package.c
@@ -1471,18 +1471,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, DWORD dwOptions,
MSIPACKAGE **pPackage)
if( szPackage[0] == '#' )
{
handle = atoiW(&szPackage[1]);
- db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE );
- if( !db )
- {
- MSIHANDLE remote;
-
- if (!(remote = msi_get_remote(handle)))
- return ERROR_INVALID_HANDLE;
-
- WARN("MsiOpenPackage not allowed during a custom action!\n");
-
- return ERROR_FUNCTION_FAILED;
- }
+ if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE)))
+ return ERROR_INVALID_HANDLE;
}
else
{
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index 454966e9148..43b8369b17f 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1154,7 +1154,7 @@ static void test_invalid_functions(MSIHANDLE hinst)
sprintf(package_name, "#%u", db);
r = MsiOpenPackageA(package_name, &package);
- todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
+ ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
MsiCloseHandle(db);
}