msi: Open the database read/write when the update count is greater than zero in MsiGetSummaryInformation.
This commit is contained in:
parent
9abdf54cb7
commit
3a7c2d005c
|
@ -475,7 +475,9 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
|
|||
|
||||
if( szDatabase )
|
||||
{
|
||||
ret = MSI_OpenDatabaseW( szDatabase, NULL, &db );
|
||||
LPCWSTR persist = uiUpdateCount ? MSIDBOPEN_TRANSACT : MSIDBOPEN_READONLY;
|
||||
|
||||
ret = MSI_OpenDatabaseW( szDatabase, persist, &db );
|
||||
if( ret != ERROR_SUCCESS )
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -4491,10 +4491,7 @@ static void set_transform_summary_info(void)
|
|||
ok(r == ERROR_SUCCESS, "Failed to set summary info\n");
|
||||
|
||||
r = MsiSummaryInfoPersist(suminfo);
|
||||
todo_wine
|
||||
{
|
||||
ok(r == ERROR_SUCCESS , "Failed to make summary info persist\n");
|
||||
}
|
||||
ok(r == ERROR_SUCCESS , "Failed to make summary info persist\n");
|
||||
|
||||
r = MsiCloseHandle(suminfo);
|
||||
ok(r == ERROR_SUCCESS , "Failed to close suminfo\n");
|
||||
|
|
|
@ -239,6 +239,32 @@ static void test_suminfo(void)
|
|||
r = MsiCloseHandle(hdb);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
/* filename, non-zero update count */
|
||||
MsiGetSummaryInformation(0, msifile, 1, &hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed\n");
|
||||
|
||||
r = MsiSummaryInfoSetProperty(hsuminfo, PID_AUTHOR, VT_LPSTR, 1, &ft, "Mike");
|
||||
ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty wrong error\n");
|
||||
|
||||
r = MsiSummaryInfoPersist(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiSummaryInfoPersist failed %u\n", r);
|
||||
|
||||
r = MsiCloseHandle(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed %u\n", r);
|
||||
|
||||
/* filename, zero update count */
|
||||
MsiGetSummaryInformation(0, msifile, 0, &hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed %u\n", r);
|
||||
|
||||
r = MsiSummaryInfoSetProperty(hsuminfo, PID_AUTHOR, VT_LPSTR, 1, &ft, "Mike");
|
||||
todo_wine ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty wrong error, %u\n", r);
|
||||
|
||||
r = MsiSummaryInfoPersist(hsuminfo);
|
||||
ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoPersist wrong error %u\n", r);
|
||||
|
||||
r = MsiCloseHandle(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
r = DeleteFile(msifile);
|
||||
ok(r, "DeleteFile failed\n");
|
||||
}
|
||||
|
@ -409,6 +435,12 @@ static void test_summary_binary(void)
|
|||
ok(r == ERROR_SUCCESS, "getpropcount failed\n");
|
||||
todo_wine ok(count == 10, "prop count incorrect\n");
|
||||
|
||||
r = MsiSummaryInfoSetProperty( hsuminfo, PID_TITLE, VT_LPSTR, 0, NULL, "Mike" );
|
||||
ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty failed %u\n", r);
|
||||
|
||||
r = MsiSummaryInfoPersist( hsuminfo );
|
||||
ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoPersist failed %u\n", r);
|
||||
|
||||
MsiCloseHandle( hsuminfo );
|
||||
MsiCloseHandle( hdb );
|
||||
|
||||
|
|
Loading…
Reference in New Issue