Jacek Caban : inseng: Added CLSID_ActiveSetupEng class factory.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Apr 20 08:24:42 CDT 2015
Module: wine
Branch: master
Commit: f3ff3e5055f08fdee8c8505e7c0d681550686fb1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f3ff3e5055f08fdee8c8505e7c0d681550686fb1
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Apr 20 13:40:40 2015 +0200
inseng: Added CLSID_ActiveSetupEng class factory.
---
dlls/inseng/Makefile.in | 3 +--
dlls/inseng/inseng_main.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 60 insertions(+), 3 deletions(-)
diff --git a/dlls/inseng/Makefile.in b/dlls/inseng/Makefile.in
index 2981c25..a4b09de 100644
--- a/dlls/inseng/Makefile.in
+++ b/dlls/inseng/Makefile.in
@@ -1,7 +1,6 @@
MODULE = inseng.dll
IMPORTS = uuid ole32 advapi32
-C_SRCS = \
- inseng_main.c
+C_SRCS = inseng_main.c
IDL_SRCS = inseng.idl
diff --git a/dlls/inseng/inseng_main.c b/dlls/inseng/inseng_main.c
index 061aabb..d264b99 100644
--- a/dlls/inseng/inseng_main.c
+++ b/dlls/inseng/inseng_main.c
@@ -30,6 +30,7 @@
#include "ole2.h"
#include "rpcproxy.h"
#include "initguid.h"
+#include "inseng.h"
#include "wine/debug.h"
@@ -37,6 +38,59 @@ WINE_DEFAULT_DEBUG_CHANNEL(inseng);
static HINSTANCE instance;
+static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
+{
+ *ppv = NULL;
+
+ if(IsEqualGUID(&IID_IUnknown, riid)) {
+ TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
+ *ppv = iface;
+ }else if(IsEqualGUID(&IID_IClassFactory, riid)) {
+ TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
+ *ppv = iface;
+ }
+
+ if(*ppv) {
+ IUnknown_AddRef((IUnknown*)*ppv);
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
+{
+ return S_OK;
+}
+
+static HRESULT WINAPI ActiveSetupEngCF_CreateInstance(IClassFactory *iface, IUnknown *outer,
+ REFIID riid, void **ppv)
+{
+ FIXME("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+static const IClassFactoryVtbl ActiveSetupEngCFVtbl = {
+ ClassFactory_QueryInterface,
+ ClassFactory_AddRef,
+ ClassFactory_Release,
+ ActiveSetupEngCF_CreateInstance,
+ ClassFactory_LockServer
+};
+
+static IClassFactory ActiveSetupEngCF = { &ActiveSetupEngCFVtbl };
+
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason)
@@ -56,8 +110,12 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
{
- FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
+ if(IsEqualGUID(rclsid, &CLSID_ActiveSetupEng)) {
+ TRACE("(CLSID_ActiveSetupEng %s %p)\n", debugstr_guid(iid), ppv);
+ return IClassFactory_QueryInterface(&ActiveSetupEngCF, iid, ppv);
+ }
+ FIXME("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
More information about the wine-cvs
mailing list