https://git.reactos.org/?p=reactos.git;a=commitdiff;h=22740df97c13cc8184328…
commit 22740df97c13cc8184328eac4c92f293eb18d670
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:14:50 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:50 2022 +0100
[WINESYNC] msi/tests: Test deferral of RegisterExtensionInfo and
UnregisterExtensionInfo.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 884d146b3243f01f00efb527bf3f3f578344da94 by Zebediah Figura
<z.figura12(a)gmail.com>
---
modules/rostests/winetests/msi/action.c | 14 ++++++++++++
modules/rostests/winetests/msi/custom.c | 34 ++++++++++++++++++++++++++++++
modules/rostests/winetests/msi/custom.spec | 2 ++
3 files changed, 50 insertions(+)
diff --git a/modules/rostests/winetests/msi/action.c
b/modules/rostests/winetests/msi/action.c
index 9c8f0165489..43d76a37d0c 100644
--- a/modules/rostests/winetests/msi/action.c
+++ b/modules/rostests/winetests/msi/action.c
@@ -1538,12 +1538,25 @@ static const char rei_install_exec_seq_dat[] =
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"UnregisterExtensionInfo\t\t3000\n"
+ "uei_immediate\tREMOVE\t3001\n"
+ "uei_deferred\tREMOVE\t3002\n"
"RegisterExtensionInfo\t\t4000\n"
+ "rei_immediate\tNOT REMOVE\t4001\n"
+ "rei_deferred\tNOT REMOVE\t4002\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"InstallFinalize\t\t6000\n";
+static const char rei_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\n"
+ "s72\ti2\tS64\tS0\n"
+ "CustomAction\tAction\n"
+ "rei_immediate\t1\tcustom.dll\trei_absent\n"
+ "rei_deferred\t1025\tcustom.dll\trei_present\n"
+ "uei_immediate\t1\tcustom.dll\trei_present\n"
+ "uei_deferred\t1025\tcustom.dll\trei_absent\n";
+
static const char rpi_file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2210,6 +2223,7 @@ static const msi_table rei_tables[] =
ADD_TABLE(rei_verb),
ADD_TABLE(rei_progid),
ADD_TABLE(rei_install_exec_seq),
+ ADD_TABLE(rei_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 a3dd90417c1..566ab1a4c66 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1608,3 +1608,37 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS;
}
+
+UINT WINAPI rei_present(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command",
&key);
+ ok(hinst, !res, "got %u\n", res);
+ RegCloseKey(key);
+}
+
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI rei_absent(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
+ ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+ res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command",
&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 75f665ea3f7..d302d059579 100644
--- a/modules/rostests/winetests/msi/custom.spec
+++ b/modules/rostests/winetests/msi/custom.spec
@@ -25,6 +25,8 @@
@ stdcall pub_absent(long)
@ stdcall rci_present(long)
@ stdcall rci_absent(long)
+@ stdcall rei_present(long)
+@ stdcall rei_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
@ stdcall sds_present(long)