https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a4c6f8f2c989b30bea3e53a546a3ca5f7722a20b

commit a4c6f8f2c989b30bea3e53a546a3ca5f7722a20b
Author:     winesync <[email protected]>
AuthorDate: Sat Mar 12 15:14:49 2022 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sun Mar 20 19:27:50 2022 +0100

    [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]>
---
 modules/rostests/winetests/msi/action.c    | 14 ++++++++++
 modules/rostests/winetests/msi/custom.c    | 43 ++++++++++++++++++++++++++++++
 modules/rostests/winetests/msi/custom.spec |  2 ++
 3 files changed, 59 insertions(+)

diff --git a/modules/rostests/winetests/msi/action.c 
b/modules/rostests/winetests/msi/action.c
index 3d747043dc5..9c8f0165489 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -1463,12 +1463,25 @@ static const char rci_install_exec_seq_dat[] =
     "RemoveFiles\t\t1700\n"
     "InstallFiles\t\t2000\n"
     "UnregisterClassInfo\t\t3000\n"
+    "uci_immediate\tREMOVE\t3001\n"
+    "uci_deferred\tREMOVE\t3002\n"
     "RegisterClassInfo\t\t4000\n"
+    "rci_immediate\tNOT REMOVE\t4001\n"
+    "rci_deferred\tNOT REMOVE\t4002\n"
     "RegisterProduct\t\t5000\n"
     "PublishFeatures\t\t5100\n"
     "PublishProduct\t\t5200\n"
     "InstallFinalize\t\t6000\n";
 
+static const char rci_custom_action_dat[] =
+    "Action\tType\tSource\tTarget\n"
+    "s72\ti2\tS64\tS0\n"
+    "CustomAction\tAction\n"
+    "rci_immediate\t1\tcustom.dll\trci_absent\n"
+    "rci_deferred\t1025\tcustom.dll\trci_present\n"
+    "uci_immediate\t1\tcustom.dll\trci_present\n"
+    "uci_deferred\t1025\tcustom.dll\trci_absent\n";
+
 static const char rei_file_dat[] =
     
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
     "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2181,6 +2194,7 @@ static const msi_table rci_tables[] =
     ADD_TABLE(rci_appid),
     ADD_TABLE(rci_class),
     ADD_TABLE(rci_install_exec_seq),
+    ADD_TABLE(rci_custom_action),
     ADD_TABLE(media),
     ADD_TABLE(property)
 };
diff --git a/modules/rostests/winetests/msi/custom.c 
b/modules/rostests/winetests/msi/custom.c
index cfb368f9c28..a3dd90417c1 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1565,3 +1565,46 @@ todo_wine
 
     return ERROR_SUCCESS;
 }
+
+UINT WINAPI rci_present(MSIHANDLE hinst)
+{
+    HKEY key;
+    LONG res;
+
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT, 
"CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
+        0, KEY_READ | KEY_WOW64_32KEY, &key);
+    ok(hinst, !res, "got %u\n", res);
+    RegCloseKey(key);
+
+    res = RegOpenKeyA(HKEY_CLASSES_ROOT, 
"FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &key);
+    ok(hinst, !res, "got %u\n", res);
+    RegCloseKey(key);
+
+    res = RegOpenKeyA(HKEY_CLASSES_ROOT, 
"AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
+    ok(hinst, !res, "got %u\n", res);
+    RegCloseKey(key);
+}
+
+    return ERROR_SUCCESS;
+}
+
+UINT WINAPI rci_absent(MSIHANDLE hinst)
+{
+    HKEY key;
+    LONG res;
+
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT, 
"CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}",
+        0, KEY_READ | KEY_WOW64_32KEY, &key);
+    ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+    res = RegOpenKeyA(HKEY_CLASSES_ROOT, 
"FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &key);
+    ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+    res = RegOpenKeyA(HKEY_CLASSES_ROOT, 
"AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &key);
+    ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+}
+
+    return ERROR_SUCCESS;
+}
diff --git a/modules/rostests/winetests/msi/custom.spec 
b/modules/rostests/winetests/msi/custom.spec
index d8b5f0826fb..75f665ea3f7 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -23,6 +23,8 @@
 @ stdcall ppc_absent(long)
 @ stdcall pub_present(long)
 @ stdcall pub_absent(long)
+@ stdcall rci_present(long)
+@ stdcall rci_absent(long)
 @ stdcall rd_present(long)
 @ stdcall rd_absent(long)
 @ stdcall sds_present(long)

Reply via email to