From 5275b1b85fb4c21db0e69e48a359a0d89dcb4029 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Sun, 1 Apr 2007 13:44:18 +0100 Subject: [PATCH] advpack: Call OleInitialize before registering OCXs, like native does. --- dlls/advpack/Makefile.in | 2 +- dlls/advpack/install.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/advpack/Makefile.in b/dlls/advpack/Makefile.in index c7a206c7197..88029d3340c 100644 --- a/dlls/advpack/Makefile.in +++ b/dlls/advpack/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = advpack.dll IMPORTLIB = libadvpack.$(IMPLIBEXT) -IMPORTS = setupapi version user32 advapi32 kernel32 ntdll +IMPORTS = ole32 setupapi version user32 advapi32 kernel32 ntdll C_SRCS = \ advpack.c \ diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c index 1209ea8e436..ed0660bb5c8 100644 --- a/dlls/advpack/install.c +++ b/dlls/advpack/install.c @@ -30,6 +30,7 @@ #include "winnls.h" #include "setupapi.h" #include "advpub.h" +#include "ole2.h" #include "wine/debug.h" #include "wine/unicode.h" #include "advpack_private.h" @@ -350,8 +351,10 @@ static HRESULT adv_install(ADVInfo *info) if (hr != S_OK) return hr; + OleInitialize(NULL); hr = iterate_section_fields(info->hinf, info->install_sec, RegisterOCXs, register_ocxs_callback, NULL); + OleUninitialize(); if (hr != S_OK) return hr;