mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
Compare commits
2 commits
30c7900c40
...
ab93b8d31b
Author | SHA1 | Date | |
---|---|---|---|
|
ab93b8d31b | ||
|
28013116c1 |
2 changed files with 71 additions and 1 deletions
|
@ -515,7 +515,7 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, const WCHAR *szDatab
|
|||
|
||||
if( szDatabase && szDatabase[0] )
|
||||
{
|
||||
LPCWSTR persist = uiUpdateCount ? MSIDBOPEN_TRANSACT : MSIDBOPEN_READONLY;
|
||||
LPCWSTR persist = uiUpdateCount ? MSIDBOPEN_DIRECT : MSIDBOPEN_READONLY;
|
||||
|
||||
ret = MSI_OpenDatabaseW( szDatabase, persist, &db );
|
||||
if( ret != ERROR_SUCCESS )
|
||||
|
|
|
@ -278,6 +278,76 @@ static void test_suminfo(void)
|
|||
r = MsiCloseHandle(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
/* try persisting on transacted msi */
|
||||
r = MsiOpenDatabaseW(msifileW, MSIDBOPEN_TRANSACT, &hdb);
|
||||
ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n");
|
||||
|
||||
r = MsiGetSummaryInformationA(hdb, NULL, 1, &hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation wrong error\n");
|
||||
|
||||
r = MsiSummaryInfoSetPropertyA(hsuminfo, PID_AUTHOR, VT_LPSTR, 1, &ft, "Fabian");
|
||||
ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty wrong error\n");
|
||||
|
||||
r = MsiSummaryInfoPersist(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiSummaryInfoPersist wrong error %u\n", r);
|
||||
|
||||
r = MsiCloseHandle(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
r = MsiCloseHandle(hdb);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
r = MsiOpenDatabaseW(msifileW, MSIDBOPEN_TRANSACT, &hdb);
|
||||
ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n");
|
||||
|
||||
r = MsiGetSummaryInformationA(hdb, NULL, 1, &hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation wrong error\n");
|
||||
|
||||
sz = 0x10;
|
||||
strcpy(buf,"x");
|
||||
r = MsiSummaryInfoGetPropertyA(hsuminfo, PID_AUTHOR, &type, NULL, NULL, buf, &sz);
|
||||
ok(r == ERROR_SUCCESS, "MsiSummaryInfoGetPropertyA wrong error\n");
|
||||
ok(!strcmp(buf,"Mike"), "buffer was wrong: %s\n", buf);
|
||||
|
||||
r = MsiCloseHandle(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
r = MsiCloseHandle(hdb);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
/* try persisting on indirectly opened msi */
|
||||
|
||||
r = MsiGetSummaryInformationA(0, msifile, 2, &hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation wrong error %u\n", r);
|
||||
|
||||
r = MsiSummaryInfoSetPropertyA(hsuminfo, PID_AUTHOR, VT_LPSTR, 1, &ft, "Fabian");
|
||||
ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty wrong error\n");
|
||||
|
||||
r = MsiSummaryInfoPersist(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiSummaryInfoPersist wrong error %u\n", r);
|
||||
|
||||
r = MsiCloseHandle(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
r = MsiOpenDatabaseW(msifileW, MSIDBOPEN_TRANSACT, &hdb);
|
||||
ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n");
|
||||
|
||||
r = MsiGetSummaryInformationA(hdb, NULL, 1, &hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation wrong error\n");
|
||||
|
||||
sz = 0x10;
|
||||
strcpy(buf,"x");
|
||||
r = MsiSummaryInfoGetPropertyA(hsuminfo, PID_AUTHOR, &type, NULL, NULL, buf, &sz);
|
||||
ok(r == ERROR_SUCCESS, "MsiSummaryInfoGetPropertyA wrong error\n");
|
||||
ok(!strcmp(buf,"Fabian"), "buffer was wrong: %s\n", buf);
|
||||
|
||||
r = MsiCloseHandle(hsuminfo);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
r = MsiCloseHandle(hdb);
|
||||
ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
|
||||
|
||||
/* Cleanup */
|
||||
r = DeleteFileA(msifile);
|
||||
ok(r, "DeleteFile failed\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue