ReactOS  0.4.15-dev-1207-g698a8e6
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 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by MSTASK_IClassFactory_QueryInterface().

◆ 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 TRACE(s)
Definition: solgame.cpp:4
LONG dll_ref
Definition: mstask_main.c:31
#define InterlockedIncrement
Definition: armddk.h:53

◆ 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 {
79  HRESULT res;
80  IUnknown *punk = NULL;
81  *ppvObj = NULL;
82 
83  TRACE("IID: %s\n",debugstr_guid(riid));
84 
85  if (pUnkOuter)
86  return CLASS_E_NOAGGREGATION;
87 
89  if (FAILED(res))
90  return res;
91 
92  res = IUnknown_QueryInterface(punk, riid, ppvObj);
93  IUnknown_Release(punk);
94  return res;
95 }
REFIID riid
Definition: precomp.h:44
HRESULT TaskSchedulerConstructor(LPVOID *ppObj) DECLSPEC_HIDDEN
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
GLuint res
Definition: glext.h:9613

◆ 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 TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ 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 
46  if (IsEqualGUID(riid, &IID_IUnknown) ||
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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:112
smooth NULL
Definition: ftsmooth.c:416
static ClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: factory.c:30
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:51
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define E_POINTER
Definition: winerror.h:2365
const GUID IID_IClassFactory

◆ 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 TRACE(s)
Definition: solgame.cpp:4
LONG dll_ref
Definition: mstask_main.c:31
#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_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
static ULONG WINAPI MSTASK_IClassFactory_Release(IClassFactory *iface)
Definition: factory.c:66

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().