Commit d3023ad3 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi/tests: Test deferral of RegisterTypeLibraries and UnregisterTypeLibraries.

parent f5da1902
TESTDLL = msi.dll
IMPORTS = cabinet msi shell32 ole32 oleaut32 user32 advapi32 version odbccp32
custom_IMPORTS = uuid msi ole32 shell32 advapi32 odbccp32
custom_IMPORTS = uuid msi ole32 shell32 advapi32 odbccp32 oleaut32
SOURCES = \
action.c \
......
......@@ -1006,14 +1006,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"
......@@ -2146,6 +2159,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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment