Skip to content

Commit a4c6f8f

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of RegisterClassInfo and UnregisterClassInfo.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id fc6bd87375a945aa456505c9b83d2e7e08c2f891 by Zebediah Figura <[email protected]>
1 parent 6a9321b commit a4c6f8f

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,12 +1463,25 @@ static const char rci_install_exec_seq_dat[] =
14631463
"RemoveFiles\t\t1700\n"
14641464
"InstallFiles\t\t2000\n"
14651465
"UnregisterClassInfo\t\t3000\n"
1466+
"uci_immediate\tREMOVE\t3001\n"
1467+
"uci_deferred\tREMOVE\t3002\n"
14661468
"RegisterClassInfo\t\t4000\n"
1469+
"rci_immediate\tNOT REMOVE\t4001\n"
1470+
"rci_deferred\tNOT REMOVE\t4002\n"
14671471
"RegisterProduct\t\t5000\n"
14681472
"PublishFeatures\t\t5100\n"
14691473
"PublishProduct\t\t5200\n"
14701474
"InstallFinalize\t\t6000\n";
14711475

1476+
static const char rci_custom_action_dat[] =
1477+
"Action\tType\tSource\tTarget\n"
1478+
"s72\ti2\tS64\tS0\n"
1479+
"CustomAction\tAction\n"
1480+
"rci_immediate\t1\tcustom.dll\trci_absent\n"
1481+
"rci_deferred\t1025\tcustom.dll\trci_present\n"
1482+
"uci_immediate\t1\tcustom.dll\trci_present\n"
1483+
"uci_deferred\t1025\tcustom.dll\trci_absent\n";
1484+
14721485
static const char rei_file_dat[] =
14731486
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
14741487
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2181,6 +2194,7 @@ static const msi_table rci_tables[] =
21812194
ADD_TABLE(rci_appid),
21822195
ADD_TABLE(rci_class),
21832196
ADD_TABLE(rci_install_exec_seq),
2197+
ADD_TABLE(rci_custom_action),
21842198
ADD_TABLE(media),
21852199
ADD_TABLE(property)
21862200
};

modules/rostests/winetests/msi/custom.c

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,3 +1565,46 @@ todo_wine
15651565

15661566
return ERROR_SUCCESS;
15671567
}
1568+
1569+
UINT WINAPI rci_present(MSIHANDLE hinst)
1570+
{
1571+
HKEY key;
1572+
LONG res;
1573+
1574+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
1575+
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
1576+
0, KEY_READ | KEY_WOW64_32KEY, &key);
1577+
ok(hinst, !res, "got %u\n", res);
1578+
RegCloseKey(key);
1579+
1580+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &key);
1581+
ok(hinst, !res, "got %u\n", res);
1582+
RegCloseKey(key);
1583+
1584+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
1585+
ok(hinst, !res, "got %u\n", res);
1586+
RegCloseKey(key);
1587+
}
1588+
1589+
return ERROR_SUCCESS;
1590+
}
1591+
1592+
UINT WINAPI rci_absent(MSIHANDLE hinst)
1593+
{
1594+
HKEY key;
1595+
LONG res;
1596+
1597+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
1598+
res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
1599+
0, KEY_READ | KEY_WOW64_32KEY, &key);
1600+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1601+
1602+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &key);
1603+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1604+
1605+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
1606+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1607+
}
1608+
1609+
return ERROR_SUCCESS;
1610+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
@ stdcall ppc_absent(long)
2424
@ stdcall pub_present(long)
2525
@ stdcall pub_absent(long)
26+
@ stdcall rci_present(long)
27+
@ stdcall rci_absent(long)
2628
@ stdcall rd_present(long)
2729
@ stdcall rd_absent(long)
2830
@ stdcall sds_present(long)

0 commit comments

Comments
 (0)