mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[WINESYNC] msi/tests: Test deferral of RegisterTypeLibraries and UnregisterTypeLibraries.
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 d3023ad3f7c87f29da762e82c7e0d47f6830df19 by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
45a3a9f56b
commit
cc5bb28b0c
4 changed files with 46 additions and 1 deletions
|
@ -3,7 +3,7 @@ spec2def(custom.dll custom.spec)
|
|||
add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def)
|
||||
target_link_libraries(custom uuid)
|
||||
set_module_type(custom win32dll)
|
||||
add_importlibs(custom msi ole32 odbccp32 shell32 advapi32 msvcrt kernel32)
|
||||
add_importlibs(custom msi ole32 oleaut32 odbccp32 shell32 advapi32 msvcrt kernel32)
|
||||
|
||||
list(APPEND SOURCE
|
||||
action.c
|
||||
|
|
|
@ -1009,14 +1009,27 @@ static const char tl_install_exec_seq_dat[] =
|
|||
"InstallInitialize\t\t1500\n"
|
||||
"ProcessComponents\t\t1600\n"
|
||||
"UnregisterTypeLibraries\t\t3100\n"
|
||||
"ut_immediate\tREMOVE\t3101\n"
|
||||
"ut_deferred\tREMOVE\t3102\n"
|
||||
"RemoveFiles\t\t3200\n"
|
||||
"InstallFiles\t\t3300\n"
|
||||
"RegisterTypeLibraries\t\t3400\n"
|
||||
"rt_immediate\tNOT REMOVE\t3401\n"
|
||||
"rt_deferred\tNOT REMOVE\t3402\n"
|
||||
"RegisterProduct\t\t5100\n"
|
||||
"PublishFeatures\t\t5200\n"
|
||||
"PublishProduct\t\t5300\n"
|
||||
"InstallFinalize\t\t6000\n";
|
||||
|
||||
static const char tl_custom_action_dat[] =
|
||||
"Action\tType\tSource\tTarget\n"
|
||||
"s72\ti2\tS64\tS0\n"
|
||||
"CustomAction\tAction\n"
|
||||
"rt_immediate\t1\tcustom.dll\ttl_absent\n"
|
||||
"rt_deferred\t1025\tcustom.dll\ttl_present\n"
|
||||
"ut_immediate\t1\tcustom.dll\ttl_present\n"
|
||||
"ut_deferred\t1025\tcustom.dll\ttl_absent\n";
|
||||
|
||||
static const char crs_file_dat[] =
|
||||
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
|
||||
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
|
||||
|
@ -2149,6 +2162,7 @@ static const msi_table tl_tables[] =
|
|||
ADD_TABLE(tl_file),
|
||||
ADD_TABLE(tl_typelib),
|
||||
ADD_TABLE(tl_install_exec_seq),
|
||||
ADD_TABLE(tl_custom_action),
|
||||
ADD_TABLE(media),
|
||||
ADD_TABLE(property)
|
||||
};
|
||||
|
|
|
@ -1804,3 +1804,32 @@ todo_wine
|
|||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static const GUID LIBID_register_test =
|
||||
{0xeac5166a, 0x9734, 0x4d91, {0x87,0x8f, 0x1d,0xd0,0x23,0x04,0xc6,0x6c}};
|
||||
|
||||
UINT WINAPI tl_present(MSIHANDLE hinst)
|
||||
{
|
||||
ITypeLib *tlb;
|
||||
HRESULT hr;
|
||||
|
||||
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
|
||||
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
|
||||
ok(hinst, hr == S_OK, "got %#x\n", hr);
|
||||
if (tlb)
|
||||
ITypeLib_Release(tlb);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT WINAPI tl_absent(MSIHANDLE hinst)
|
||||
{
|
||||
ITypeLib *tlb;
|
||||
HRESULT hr;
|
||||
|
||||
hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
|
||||
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
|
||||
ok(hinst, hr == TYPE_E_LIBNOTREGISTERED, "got %#x\n", hr);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -45,3 +45,5 @@
|
|||
@ stdcall sis_absent(long)
|
||||
@ stdcall sss_started(long)
|
||||
@ stdcall sss_stopped(long)
|
||||
@ stdcall tl_present(long)
|
||||
@ stdcall tl_absent(long)
|
||||
|
|
Loading…
Reference in a new issue