[WINESYNC] msi/tests: Test deferral of RegisterMimeInfo and UnregisterMimeInfo.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id f181e71400eb25a9aa4e1bf6355116269d04c0b7 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
winesync 2022-03-12 15:14:51 +01:00 committed by Mark Jansen
parent 13c16770a5
commit c6f0b6c95e
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
3 changed files with 40 additions and 0 deletions

View file

@ -1716,13 +1716,26 @@ static const char rmi_install_exec_seq_dat[] =
"InstallFiles\t\t2000\n"
"UnregisterExtensionInfo\t\t3000\n"
"UnregisterMIMEInfo\t\t3500\n"
"umi_immediate\tREMOVE\t3501\n"
"umi_deferred\tREMOVE\t3502\n"
"RegisterExtensionInfo\t\t4000\n"
"RegisterMIMEInfo\t\t4500\n"
"rmi_immediate\tNOT REMOVE\t4501\n"
"rmi_deferred\tNOT REMOVE\t4502\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"InstallFinalize\t\t6000\n";
static const char rmi_custom_action_dat[] =
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"rmi_immediate\t1\tcustom.dll\trmi_absent\n"
"rmi_deferred\t1025\tcustom.dll\trmi_present\n"
"umi_immediate\t1\tcustom.dll\trmi_present\n"
"umi_deferred\t1025\tcustom.dll\trmi_absent\n";
static const char pa_file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@ -2270,6 +2283,7 @@ static const msi_table rmi_tables[] =
ADD_TABLE(rmi_verb),
ADD_TABLE(rmi_mime),
ADD_TABLE(rmi_install_exec_seq),
ADD_TABLE(rmi_custom_action),
ADD_TABLE(media),
ADD_TABLE(property)
};

View file

@ -1674,3 +1674,27 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS;
}
UINT WINAPI rmi_present(MSIHANDLE hinst)
{
HKEY key;
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &key);
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, !res, "got %u\n", res);
return ERROR_SUCCESS;
}
UINT WINAPI rmi_absent(MSIHANDLE hinst)
{
HKEY key;
LONG res;
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &key);
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
return ERROR_SUCCESS;
}

View file

@ -29,6 +29,8 @@
@ stdcall rci_absent(long)
@ stdcall rei_present(long)
@ stdcall rei_absent(long)
@ stdcall rmi_present(long)
@ stdcall rmi_absent(long)
@ stdcall rd_present(long)
@ stdcall rd_absent(long)
@ stdcall sds_present(long)