ReactOS 0.4.16-dev-2354-g16de117
oleproxy.c File Reference
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "objbase.h"
#include "ole2.h"
#include "rpc.h"
#include "compobj_private.h"
#include "moniker.h"
#include "comcat.h"
#include "wine/debug.h"
Include dependency graph for oleproxy.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ole)
 
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_LockServer (IClassFactory *iface, BOOL fLock)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID iid, LPVOID *ppv)
 
HRESULT WINAPI Ole32DllGetClassObject (REFCLSID rclsid, REFIID riid, void **obj)
 

Variables

static const IClassFactoryVtbl FileMonikerCFVtbl
 
static IClassFactory FileMonikerCF = { &FileMonikerCFVtbl }
 
static const IClassFactoryVtbl ItemMonikerCFVtbl
 
static IClassFactory ItemMonikerCF = { &ItemMonikerCFVtbl }
 
static const IClassFactoryVtbl AntiMonikerCFVtbl
 
static IClassFactory AntiMonikerCF = { &AntiMonikerCFVtbl }
 
static const IClassFactoryVtbl CompositeMonikerCFVtbl
 
static IClassFactory CompositeMonikerCF = { &CompositeMonikerCFVtbl }
 
static const IClassFactoryVtbl ClassMonikerCFVtbl
 
static IClassFactory ClassMonikerCF = { &ClassMonikerCFVtbl }
 
static const IClassFactoryVtbl PointerMonikerCFVtbl
 
static IClassFactory PointerMonikerCF = { &PointerMonikerCFVtbl }
 
static const IClassFactoryVtbl ObjrefMonikerCFVtbl
 
static IClassFactory ObjrefMonikerCF = { &ObjrefMonikerCFVtbl }
 
static const IClassFactoryVtbl ComCatCFVtbl
 
static IClassFactory ComCatCF = { &ComCatCFVtbl }
 
static const IClassFactoryVtbl GlobalInterfaceTableCFVtbl
 
IClassFactory GlobalInterfaceTableCF = { &GlobalInterfaceTableCFVtbl }
 
static const IClassFactoryVtbl ManualResetEventCFVtbl
 
IClassFactory ManualResetEventCF = { &ManualResetEventCFVtbl }
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 27 of file oleproxy.c.

Function Documentation

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory iface)
static

Definition at line 58 of file oleproxy.c.

59{
60 return 2;
61}

◆ ClassFactory_LockServer()

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

Definition at line 68 of file oleproxy.c.

69{
70 TRACE("(%x)\n", fLock);
71 return S_OK;
72}
#define S_OK
Definition: intsafe.h:52
#define TRACE(s)
Definition: solgame.cpp:4

◆ ClassFactory_QueryInterface()

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

Definition at line 44 of file oleproxy.c.

45{
46 TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
47
49 {
50 *ppv = iface;
51 return S_OK;
52 }
53
54 *ppv = NULL;
55 return E_NOINTERFACE;
56}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define NULL
Definition: types.h:112
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ ClassFactory_Release()

static ULONG WINAPI ClassFactory_Release ( IClassFactory iface)
static

Definition at line 63 of file oleproxy.c.

64{
65 return 1;
66}

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  iid,
LPVOID ppv 
)

Definition at line 187 of file oleproxy.c.

188{
189 HRESULT hr;
190
191 *ppv = NULL;
192 if (IsEqualIID(rclsid,&CLSID_DfMarshal)&&(
195 )
196 )
199 return IClassFactory_QueryInterface(&GlobalInterfaceTableCF, iid, ppv);
201 return IClassFactory_QueryInterface(&ManualResetEventCF, iid, ppv);
202 if (IsEqualCLSID(rclsid, &CLSID_FileMoniker))
203 return IClassFactory_QueryInterface(&FileMonikerCF, iid, ppv);
204 if (IsEqualCLSID(rclsid, &CLSID_ItemMoniker))
205 return IClassFactory_QueryInterface(&ItemMonikerCF, iid, ppv);
206 if (IsEqualCLSID(rclsid, &CLSID_AntiMoniker))
207 return IClassFactory_QueryInterface(&AntiMonikerCF, iid, ppv);
208 if (IsEqualCLSID(rclsid, &CLSID_CompositeMoniker))
209 return IClassFactory_QueryInterface(&CompositeMonikerCF, iid, ppv);
210 if (IsEqualCLSID(rclsid, &CLSID_ClassMoniker))
211 return IClassFactory_QueryInterface(&ClassMonikerCF, iid, ppv);
212 if (IsEqualCLSID(rclsid, &CLSID_ObjrefMoniker))
213 return IClassFactory_QueryInterface(&ObjrefMonikerCF, iid, ppv);
214 if (IsEqualCLSID(rclsid, &CLSID_PointerMoniker))
215 return IClassFactory_QueryInterface(&PointerMonikerCF, iid, ppv);
216 if (IsEqualGUID(rclsid, &CLSID_StdComponentCategoriesMgr))
217 return IClassFactory_QueryInterface(&ComCatCF, iid, ppv);
218
219 hr = OLE32_DllGetClassObject(rclsid, iid, ppv);
220 if (SUCCEEDED(hr))
221 return hr;
222
223 return Handler_DllGetClassObject(rclsid, iid, ppv);
224}
const CLSID CLSID_ManualResetEvent
const CLSID CLSID_StdGlobalInterfaceTable
HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv)
Definition: marshal.c:92
HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: compobj.c:911
#define SUCCEEDED(hr)
Definition: intsafe.h:50
static const GUID CLSID_DfMarshal
Definition: marshal.c:62
static IClassFactory ObjrefMonikerCF
Definition: oleproxy.c:149
static IClassFactory AntiMonikerCF
Definition: oleproxy.c:105
static IClassFactory PointerMonikerCF
Definition: oleproxy.c:138
static IClassFactory CompositeMonikerCF
Definition: oleproxy.c:116
IClassFactory GlobalInterfaceTableCF
Definition: oleproxy.c:171
static IClassFactory ClassMonikerCF
Definition: oleproxy.c:127
static IClassFactory ComCatCF
Definition: oleproxy.c:160
IClassFactory ManualResetEventCF
Definition: oleproxy.c:182
static IClassFactory FileMonikerCF
Definition: oleproxy.c:83
static IClassFactory ItemMonikerCF
Definition: oleproxy.c:94
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
HRESULT hr
Definition: shlfolder.c:183

◆ Ole32DllGetClassObject()

HRESULT WINAPI Ole32DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
void **  obj 
)

Definition at line 229 of file oleproxy.c.

230{
232 return IClassFactory_QueryInterface(&GlobalInterfaceTableCF, riid, obj);
233 else if (IsEqualCLSID(rclsid, &CLSID_ManualResetEvent))
234 return IClassFactory_QueryInterface(&ManualResetEventCF, riid, obj);
235 else if (IsEqualCLSID(rclsid, &CLSID_InProcFreeMarshaler))
236 return FTMarshalCF_Create(riid, obj);
237 else
239}
const CLSID CLSID_InProcFreeMarshaler
HRESULT FTMarshalCF_Create(REFIID riid, LPVOID *ppv)
Definition: ftmarshal.c:99
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:3772

Referenced by com_get_class_object().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )

Variable Documentation

◆ AntiMonikerCF

IClassFactory AntiMonikerCF = { &AntiMonikerCFVtbl }
static

Definition at line 105 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ AntiMonikerCFVtbl

const IClassFactoryVtbl AntiMonikerCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI AntiMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
Definition: antimoniker.c:633
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58

Definition at line 96 of file oleproxy.c.

◆ ClassMonikerCF

IClassFactory ClassMonikerCF = { &ClassMonikerCFVtbl }
static

Definition at line 127 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ ClassMonikerCFVtbl

const IClassFactoryVtbl ClassMonikerCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI ClassMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
Definition: classmoniker.c:686

Definition at line 118 of file oleproxy.c.

◆ ComCatCF

IClassFactory ComCatCF = { &ComCatCFVtbl }
static

Definition at line 160 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ ComCatCFVtbl

const IClassFactoryVtbl ComCatCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI ComCat_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppvObj)
Definition: comcat.c:686

Definition at line 151 of file oleproxy.c.

◆ CompositeMonikerCF

IClassFactory CompositeMonikerCF = { &CompositeMonikerCFVtbl }
static

Definition at line 116 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ CompositeMonikerCFVtbl

const IClassFactoryVtbl CompositeMonikerCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI CompositeMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)

Definition at line 107 of file oleproxy.c.

◆ FileMonikerCF

IClassFactory FileMonikerCF = { &FileMonikerCFVtbl }
static

Definition at line 83 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ FileMonikerCFVtbl

const IClassFactoryVtbl FileMonikerCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI FileMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
Definition: filemoniker.c:1486

Definition at line 74 of file oleproxy.c.

◆ GlobalInterfaceTableCF

IClassFactory GlobalInterfaceTableCF = { &GlobalInterfaceTableCFVtbl }

Definition at line 171 of file oleproxy.c.

Referenced by DllGetClassObject(), and Ole32DllGetClassObject().

◆ GlobalInterfaceTableCFVtbl

const IClassFactoryVtbl GlobalInterfaceTableCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI GlobalInterfaceTable_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
Definition: git.c:303

Definition at line 162 of file oleproxy.c.

◆ ItemMonikerCF

IClassFactory ItemMonikerCF = { &ItemMonikerCFVtbl }
static

Definition at line 94 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ ItemMonikerCFVtbl

const IClassFactoryVtbl ItemMonikerCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI ItemMoniker_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
Definition: itemmoniker.c:978

Definition at line 85 of file oleproxy.c.

◆ ManualResetEventCF

IClassFactory ManualResetEventCF = { &ManualResetEventCFVtbl }

Definition at line 182 of file oleproxy.c.

Referenced by DllGetClassObject(), and Ole32DllGetClassObject().

◆ ManualResetEventCFVtbl

const IClassFactoryVtbl ManualResetEventCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI ManualResetEvent_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID iid, void **ppv)
Definition: compobj.c:481

Definition at line 173 of file oleproxy.c.

◆ ObjrefMonikerCF

IClassFactory ObjrefMonikerCF = { &ObjrefMonikerCFVtbl }
static

Definition at line 149 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ ObjrefMonikerCFVtbl

const IClassFactoryVtbl ObjrefMonikerCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI ObjrefMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)

Definition at line 140 of file oleproxy.c.

◆ PointerMonikerCF

IClassFactory PointerMonikerCF = { &PointerMonikerCFVtbl }
static

Definition at line 138 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ PointerMonikerCFVtbl

const IClassFactoryVtbl PointerMonikerCFVtbl
static
Initial value:
=
{
}
HRESULT WINAPI PointerMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)

Definition at line 129 of file oleproxy.c.