ReactOS 0.4.17-dev-934-g091855f
main.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "ole2.h"
#include "rpcproxy.h"
#include "dimm.h"
#include "wine/debug.h"
Include dependency graph for main.c:

Go to the source code of this file.

Classes

class  ClassFactory
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msimtf)
 
HRESULT ActiveIMMApp_Constructor (IUnknown *punkOuter, IUnknown **ppOut)
 
static ClassFactory * impl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_QueryInterface (IClassFactory *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ClassFactory_AddRef (IClassFactory *iface)
 
static ULONG WINAPI ClassFactory_Release (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_CreateInstance (IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
 
static HRESULT WINAPI ClassFactory_LockServer (IClassFactory *iface, BOOL dolock)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 

Variables

static const IClassFactoryVtbl ClassFactoryVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file main.c.

Function Documentation

◆ ActiveIMMApp_Constructor()

HRESULT ActiveIMMApp_Constructor ( IUnknown *  punkOuter,
IUnknown **  ppOut 
)

Definition at line 890 of file activeimmapp.c.

891{
893 if (pUnkOuter)
895
897 if (This == NULL)
898 return E_OUTOFMEMORY;
899
900 This->IActiveIMMApp_iface.lpVtbl = &ActiveIMMAppVtbl;
901 This->IActiveIMMMessagePumpOwner_iface.lpVtbl = &ActiveIMMMessagePumpOwnerVtbl;
902 This->refCount = 1;
903
904 TRACE("returning %p\n",This);
905 *ppOut = (IUnknown *)&This->IActiveIMMApp_iface;
906 return S_OK;
907}
static const IActiveIMMAppVtbl ActiveIMMAppVtbl
Definition: activeimmapp.c:739
static const IActiveIMMMessagePumpOwnerVtbl ActiveIMMMessagePumpOwnerVtbl
Definition: activeimmapp.c:878
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define S_OK
Definition: intsafe.h:52
#define TRACE(s)
Definition: solgame.cpp:4
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:3771

Referenced by DllGetClassObject().

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory *  iface)
static

Definition at line 71 of file main.c.

72{
73 return 2;
74}

◆ ClassFactory_CreateInstance()

static HRESULT WINAPI ClassFactory_CreateInstance ( IClassFactory *  iface,
IUnknown *  pOuter,
REFIID  riid,
void **  ppv 
)
static

Definition at line 81 of file main.c.

83{
87 TRACE("(%p, %p, %s, %p)\n", iface, pOuter, debugstr_guid(riid), ppv);
88
89 ret = This->cf(pOuter, &obj);
90 if (FAILED(ret))
91 return ret;
92
93 ret = IUnknown_QueryInterface(obj,riid,ppv);
94 IUnknown_Release(obj);
95 return ret;
96}
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: main.c:49
return ret
Definition: mutex.c:147
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35

◆ ClassFactory_LockServer()

static HRESULT WINAPI ClassFactory_LockServer ( IClassFactory *  iface,
BOOL  dolock 
)
static

Definition at line 98 of file main.c.

99{
100 FIXME("(%d)\n", dolock);
101 return S_OK;
102}
#define FIXME(fmt,...)
Definition: precomp.h:53

◆ ClassFactory_QueryInterface()

static HRESULT WINAPI ClassFactory_QueryInterface ( IClassFactory *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 49 of file main.c.

51{
52 *ppv = NULL;
53
55 TRACE("(IID_IUnknown %p)\n", ppv);
56 *ppv = iface;
58 TRACE("IID_IClassFactory %p)\n", ppv);
59 *ppv = iface;
60 }
61
62 if(*ppv) {
63 IUnknown_AddRef((IUnknown*)*ppv);
64 return S_OK;
65 }
66
67 FIXME("(%s %p)\n", debugstr_guid(riid), ppv);
68 return E_NOINTERFACE;
69}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ ClassFactory_Release()

static ULONG WINAPI ClassFactory_Release ( IClassFactory *  iface)
static

Definition at line 76 of file main.c.

77{
78 return 1;
79}

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID *  ppv 
)

Definition at line 115 of file main.c.

116{
117 if(IsEqualGUID(&CLSID_CActiveIMM, rclsid)) {
118 static ClassFactory cf = {
119 { &ClassFactoryVtbl },
121 };
122
123 return IClassFactory_QueryInterface(&cf.IClassFactory_iface, riid, ppv);
124 }
125
126 FIXME("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
128}
HRESULT ActiveIMMApp_Constructor(IUnknown *punkOuter, IUnknown **ppOut)
Definition: activeimmapp.c:890
static const IClassFactoryVtbl ClassFactoryVtbl
Definition: main.c:104
IClassFactory IClassFactory_iface
Definition: inetcomm_main.c:69
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:3772

◆ impl_from_IClassFactory()

static ClassFactory * impl_from_IClassFactory ( IClassFactory *  iface)
inlinestatic

Definition at line 44 of file main.c.

45{
46 return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface);
47}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msimtf  )

Variable Documentation

◆ ClassFactoryVtbl

const IClassFactoryVtbl ClassFactoryVtbl
static
Initial value:
= {
}
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
Definition: main.c:262
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFGUID riid, void **ppvObject)
Definition: main.c:220
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: main.c:241
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: main.c:233
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
Definition: main.c:255

Definition at line 104 of file main.c.

Referenced by DllGetClassObject().