ieframe.dll uses manifest at ID 123. However, IEWinMain() is not called from rundll32.exe or Control_RunDLL() so the manifest needs to be activated in DllMain(). This allows iexplore.exe to enable theming.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/ieframe/ieframe.manifest | 16 ++++++++++++++++ dlls/ieframe/ieframe.rc | 3 +++ dlls/ieframe/ieframe_main.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 dlls/ieframe/ieframe.manifest
diff --git a/dlls/ieframe/ieframe.manifest b/dlls/ieframe/ieframe.manifest new file mode 100644 index 00000000000..c8fd3eb4dce --- /dev/null +++ b/dlls/ieframe/ieframe.manifest @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<assemblyIdentity type="win32" name="Wine.Ieframe" version="0.0.0.0"/> +<dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> +</dependency> +</assembly> diff --git a/dlls/ieframe/ieframe.rc b/dlls/ieframe/ieframe.rc index aed8483e4ce..eb05a98dbc4 100644 --- a/dlls/ieframe/ieframe.rc +++ b/dlls/ieframe/ieframe.rc @@ -108,6 +108,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include "wine/wine_common_ver.rc"
+/* @makedep: ieframe.manifest */ +123 RT_MANIFEST ieframe.manifest + /* @makedep: ietoolbar.bmp */ IDB_IETOOLBAR BITMAP ietoolbar.bmp
diff --git a/dlls/ieframe/ieframe_main.c b/dlls/ieframe/ieframe_main.c index 8775e244d1c..2ef1c3784c0 100644 --- a/dlls/ieframe/ieframe_main.c +++ b/dlls/ieframe/ieframe_main.c @@ -17,6 +17,7 @@ */
#include "ieframe.h" +#include <commctrl.h>
#include "initguid.h" #include "rpcproxy.h" @@ -30,6 +31,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
LONG module_ref = 0; HINSTANCE ieframe_instance; +static HANDLE context = INVALID_HANDLE_VALUE; +static ULONG_PTR context_cookie; +static BOOL context_activated;
static ITypeLib *typelib; static ITypeInfo *typeinfos[LAST_tid]; @@ -178,6 +182,27 @@ static const IClassFactoryVtbl CUrlHistoryFactoryVtbl = {
static IClassFactory CUrlHistoryFactory = { &CUrlHistoryFactoryVtbl };
+static void activate_context(void) +{ + ACTCTXW actctx; + + memset(&actctx, 0, sizeof(actctx)); + actctx.cbSize = sizeof(actctx); + actctx.hModule = ieframe_instance; + actctx.lpResourceName = MAKEINTRESOURCEW(123); + actctx.dwFlags = ACTCTX_FLAG_HMODULE_VALID | ACTCTX_FLAG_RESOURCE_NAME_VALID; + context = CreateActCtxW(&actctx); + if (context != INVALID_HANDLE_VALUE) + context_activated = ActivateActCtx(context, &context_cookie); +} + +static void deactivate_context(void) +{ + if (context_activated) + DeactivateActCtx(0, context_cookie); + ReleaseActCtx(context); +} + /****************************************************************** * DllMain (ieframe.@) */ @@ -189,6 +214,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) { case DLL_PROCESS_ATTACH: ieframe_instance = hInstDLL; + activate_context(); + InitCommonControls(); register_iewindow_class(); DisableThreadLibraryCalls(ieframe_instance); break; @@ -196,6 +223,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) if (lpv) break; unregister_iewindow_class(); release_typelib(); + deactivate_context(); }
return TRUE;