From: Alex Henrie alexhenrie24@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56209 --- dlls/advpack/install.c | 8 ++++++++ dlls/advpack/tests/install.c | 21 ++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c index b32a6f4c972..81ceebbe7aa 100644 --- a/dlls/advpack/install.c +++ b/dlls/advpack/install.c @@ -128,6 +128,14 @@ static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, const void *arg) if (!SetupGetStringFieldW(&context, 1, buffer, ARRAY_SIZE(buffer), NULL)) continue;
+ /* RegisterOCXs and UnRegisterOCXs sections can include lines that start with an at sign and + * do not have any discernable or documented effect */ + if (buffer[0] == '@') + { + FIXME("Ignoring inf line %s\n", debugstr_w(buffer)); + continue; + } + hm = LoadLibraryExW(buffer, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); if (hm) { diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c index bdf02c5a397..f6ab592a3eb 100644 --- a/dlls/advpack/tests/install.c +++ b/dlls/advpack/tests/install.c @@ -66,7 +66,12 @@ static void create_inf_file(LPCSTR filename) "Signature="$Chicago$"\n" "AdvancedINF=2.5\n" "[DefaultInstall]\n" - "CheckAdminRights=1\n"; + "CheckAdminRights=1\n" + "[OcxInstall]\n" + "RegisterOCXs=OCXsToRegister\n" + "[OCXsToRegister]\n" + "@foobar\n" + "@foobaz\n";
WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL); CloseHandle(hf); @@ -262,6 +267,19 @@ static void test_LaunchINFSectionEx(void) DeleteFileA("test.inf"); }
+static void test_RegisterOCXs(void) +{ + static char section[] = "test.inf,OcxInstall,4,0"; + HRESULT hr; + + create_inf_file("test.inf"); + + hr = pLaunchINFSection(NULL, NULL, section, 0); + ok(hr == S_OK, "Expected 0, got %ld\n", hr); + + DeleteFileA("test.inf"); +} + START_TEST(install) { DWORD len; @@ -289,6 +307,7 @@ START_TEST(install) test_RunSetupCommand(); test_LaunchINFSection(); test_LaunchINFSectionEx(); + test_RegisterOCXs();
FreeLibrary(hAdvPack); SetCurrentDirectoryA(prev_path);