From 960d7f9fdb0b57a5e6a74a05039f1d1b93576263 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 2 Oct 2009 13:54:51 +0200 Subject: [PATCH] jscript: Added FIXME about IClassFactoryEx. --- dlls/jscript/activex.c | 15 +++++++++++++-- dlls/jscript/jscript_main.c | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/activex.c b/dlls/jscript/activex.c index 2029edfc74..e37abd2bd7 100644 --- a/dlls/jscript/activex.c +++ b/dlls/jscript/activex.c @@ -21,6 +21,7 @@ #include "jscript.h" #include "objsafe.h" +#include "mshtmhst.h" #include "wine/debug.h" @@ -59,6 +60,8 @@ static IUnknown *create_activex_object(script_ctx_t *ctx, const WCHAR *progid) { IInternetHostSecurityManager *secmgr; struct CONFIRMSAFETY cs; + IClassFactoryEx *cfex; + IClassFactory *cf; DWORD policy_size; BYTE *bpolicy; IUnknown *obj; @@ -82,9 +85,17 @@ static IUnknown *create_activex_object(script_ctx_t *ctx, const WCHAR *progid) if(FAILED(hres) || policy != URLPOLICY_ALLOW) return NULL; - /* FIXME: Use IClassFactoryEx */ + hres = CoGetClassObject(&guid, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, NULL, &IID_IClassFactory, (void**)&cf); + if(FAILED(hres)) + return NULL; - hres = CoCreateInstance(&guid, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void**)&obj); + hres = IClassFactory_QueryInterface(cf, &IID_IClassFactoryEx, (void**)&cfex); + if(SUCCEEDED(hres)) { + FIXME("Use IClassFactoryEx\n"); + IClassFactoryEx_Release(cfex); + } + + hres = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void**)&obj); if(FAILED(hres)) return NULL; diff --git a/dlls/jscript/jscript_main.c b/dlls/jscript/jscript_main.c index 4f59ecbc11..78f8f00e75 100644 --- a/dlls/jscript/jscript_main.c +++ b/dlls/jscript/jscript_main.c @@ -24,6 +24,7 @@ #include "advpub.h" #include "activaut.h" #include "objsafe.h" +#include "mshtmhst.h" #include "wine/debug.h"