From bd9d8a32e4a28b86b6f8b15ee9cec9e6e5ecca16 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Wed, 5 Nov 2003 01:50:19 +0000 Subject: [PATCH] MsiOpenDatabase's szPersist parameter may be a string or a bitmask. --- dlls/msi/msi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index e63cf4969a1..c0963309b2f 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -149,7 +149,7 @@ UINT WINAPI MsiOpenDatabaseA( MultiByteToWideChar( CP_ACP, 0, szDBPath, -1, szwDBPath, len ); } - if( szPersist ) + if( HIWORD(szPersist) ) { len = MultiByteToWideChar( CP_ACP, 0, szPersist, -1, NULL, 0 ); szwPersist = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); @@ -157,6 +157,8 @@ UINT WINAPI MsiOpenDatabaseA( goto end; MultiByteToWideChar( CP_ACP, 0, szPersist, -1, szwPersist, len ); } + else + szwPersist = (LPWSTR) szPersist; r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB );