inseng: Added CLSID_ActiveSetupEng class factory.

This commit is contained in:
Jacek Caban 2015-04-20 13:40:40 +02:00 committed by Alexandre Julliard
parent 2c59f6fe46
commit f3ff3e5055
2 changed files with 60 additions and 3 deletions

View File

@ -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

View File

@ -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;
}