ReactOS 0.4.16-dev-297-gc569aee
factory.c File Reference
#include "mstask_private.h"
#include "wine/debug.h"
Include dependency graph for factory.c:

Go to the source code of this file.

Classes

struct  ClassFactoryImpl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (mstask)
 
static ClassFactoryImplimpl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI MSTASK_IClassFactory_QueryInterface (LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI MSTASK_IClassFactory_AddRef (IClassFactory *face)
 
static ULONG WINAPI MSTASK_IClassFactory_Release (IClassFactory *iface)
 
static HRESULT WINAPI MSTASK_IClassFactory_CreateInstance (IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, LPVOID *ppvObj)
 
static HRESULT WINAPI MSTASK_IClassFactory_LockServer (IClassFactory *iface, BOOL fLock)
 

Variables

static const IClassFactoryVtbl IClassFactory_Vtbl
 
ClassFactoryImpl MSTASK_ClassFactory = { { &IClassFactory_Vtbl } }
 

Function Documentation

◆ impl_from_IClassFactory()

static ClassFactoryImpl * impl_from_IClassFactory ( IClassFactory iface)
inlinestatic

Definition at line 30 of file factory.c.

31{
32 return CONTAINING_RECORD(iface, ClassFactoryImpl, IClassFactory_iface);
33}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

◆ MSTASK_IClassFactory_AddRef()

static ULONG WINAPI MSTASK_IClassFactory_AddRef ( IClassFactory face)
static

Definition at line 59 of file factory.c.

60{
61 TRACE("\n");
63 return 2;
64}
#define InterlockedIncrement
Definition: armddk.h:53
LONG dll_ref
Definition: mstask_main.c:31
#define TRACE(s)
Definition: solgame.cpp:4

◆ MSTASK_IClassFactory_CreateInstance()

static HRESULT WINAPI MSTASK_IClassFactory_CreateInstance ( IClassFactory iface,
IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 73 of file factory.c.

78{
80 IUnknown *punk = NULL;
81 *ppvObj = NULL;
82
83 TRACE("IID: %s\n",debugstr_guid(riid));
84
85 if (pUnkOuter)
87
89 if (FAILED(res))
90 return res;
91
92 res = IUnknown_QueryInterface(punk, riid, ppvObj);
93 IUnknown_Release(punk);
94 return res;
95}
#define NULL
Definition: types.h:112
GLuint res
Definition: glext.h:9613
REFIID riid
Definition: atlbase.h:39
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
HRESULT TaskSchedulerConstructor(LPVOID *ppObj) DECLSPEC_HIDDEN
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ MSTASK_IClassFactory_LockServer()

static HRESULT WINAPI MSTASK_IClassFactory_LockServer ( IClassFactory iface,
BOOL  fLock 
)
static

Definition at line 97 of file factory.c.

100{
101 TRACE("\n");
102
103 if (fLock)
104 IClassFactory_AddRef(iface);
105 else
106 IClassFactory_Release(iface);
107 return S_OK;
108}
#define S_OK
Definition: intsafe.h:52

◆ MSTASK_IClassFactory_QueryInterface()

static HRESULT WINAPI MSTASK_IClassFactory_QueryInterface ( LPCLASSFACTORY  iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 35 of file factory.c.

39{
41
42 TRACE("IID: %s\n",debugstr_guid(riid));
43 if (ppvObj == NULL)
44 return E_POINTER;
45
48 {
49 *ppvObj = &This->IClassFactory_iface;
50 IClassFactory_AddRef(iface);
51 return S_OK;
52 }
53
54 WARN("Unknown interface: %s\n", debugstr_guid(riid));
55 *ppvObj = NULL;
56 return E_NOINTERFACE;
57}
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: factory.c:51
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365

◆ MSTASK_IClassFactory_Release()

static ULONG WINAPI MSTASK_IClassFactory_Release ( IClassFactory iface)
static

Definition at line 66 of file factory.c.

67{
68 TRACE("\n");
70 return 1;
71}
#define InterlockedDecrement
Definition: armddk.h:52

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( mstask  )

Variable Documentation

◆ IClassFactory_Vtbl

const IClassFactoryVtbl IClassFactory_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI MSTASK_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj)
Definition: factory.c:35
static ULONG WINAPI MSTASK_IClassFactory_Release(IClassFactory *iface)
Definition: factory.c:66
static ULONG WINAPI MSTASK_IClassFactory_AddRef(IClassFactory *face)
Definition: factory.c:59
static HRESULT WINAPI MSTASK_IClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, LPVOID *ppvObj)
Definition: factory.c:73
static HRESULT WINAPI MSTASK_IClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: factory.c:97

Definition at line 110 of file factory.c.

◆ MSTASK_ClassFactory

ClassFactoryImpl MSTASK_ClassFactory = { { &IClassFactory_Vtbl } }

Definition at line 119 of file factory.c.

Referenced by DllGetClassObject().