Commit bd9d8a32 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

MsiOpenDatabase's szPersist parameter may be a string or a bitmask.

parent 16ff6689
...@@ -149,7 +149,7 @@ UINT WINAPI MsiOpenDatabaseA( ...@@ -149,7 +149,7 @@ UINT WINAPI MsiOpenDatabaseA(
MultiByteToWideChar( CP_ACP, 0, szDBPath, -1, szwDBPath, len ); MultiByteToWideChar( CP_ACP, 0, szDBPath, -1, szwDBPath, len );
} }
if( szPersist ) if( HIWORD(szPersist) )
{ {
len = MultiByteToWideChar( CP_ACP, 0, szPersist, -1, NULL, 0 ); len = MultiByteToWideChar( CP_ACP, 0, szPersist, -1, NULL, 0 );
szwPersist = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); szwPersist = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
...@@ -157,6 +157,8 @@ UINT WINAPI MsiOpenDatabaseA( ...@@ -157,6 +157,8 @@ UINT WINAPI MsiOpenDatabaseA(
goto end; goto end;
MultiByteToWideChar( CP_ACP, 0, szPersist, -1, szwPersist, len ); MultiByteToWideChar( CP_ACP, 0, szPersist, -1, szwPersist, len );
} }
else
szwPersist = (LPWSTR) szPersist;
r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB ); r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment