diff --git a/dlls/msi/tests/Makefile.in b/dlls/msi/tests/Makefile.in index 5c7e81eeed6..5f85d119fa6 100644 --- a/dlls/msi/tests/Makefile.in +++ b/dlls/msi/tests/Makefile.in @@ -1,7 +1,7 @@ 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 \ diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 1cf9e9e7411..306bfae6f84 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/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) }; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 7a3f01ed29a..b7da2b8fcc8 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -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; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index eec6a43c0a1..058a9172f1f 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -45,3 +45,5 @@ @ stdcall sis_absent(long) @ stdcall sss_started(long) @ stdcall sss_stopped(long) +@ stdcall tl_present(long) +@ stdcall tl_absent(long)