ReactOS  0.4.14-dev-358-gbef841c
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)
 

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 ComCatCFVtbl
 
static IClassFactory ComCatCF = { &ComCatCFVtbl }
 
static const IClassFactoryVtbl GlobalOptionsCFVtbl
 
IClassFactory GlobalOptionsCF = { &GlobalOptionsCFVtbl }
 

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

◆ 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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ 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 165 of file oleproxy.c.

166 {
167  HRESULT hr;
168 
169  *ppv = NULL;
170  if (IsEqualIID(rclsid,&CLSID_DfMarshal)&&(
173  )
174  )
178  if (IsEqualCLSID(rclsid, &CLSID_FileMoniker))
179  return IClassFactory_QueryInterface(&FileMonikerCF, iid, ppv);
180  if (IsEqualCLSID(rclsid, &CLSID_ItemMoniker))
181  return IClassFactory_QueryInterface(&ItemMonikerCF, iid, ppv);
182  if (IsEqualCLSID(rclsid, &CLSID_AntiMoniker))
183  return IClassFactory_QueryInterface(&AntiMonikerCF, iid, ppv);
184  if (IsEqualCLSID(rclsid, &CLSID_CompositeMoniker))
185  return IClassFactory_QueryInterface(&CompositeMonikerCF, iid, ppv);
186  if (IsEqualCLSID(rclsid, &CLSID_ClassMoniker))
187  return IClassFactory_QueryInterface(&ClassMonikerCF, iid, ppv);
188  if (IsEqualCLSID(rclsid, &CLSID_PointerMoniker))
189  return IClassFactory_QueryInterface(&PointerMonikerCF, iid, ppv);
190  if (IsEqualGUID(rclsid, &CLSID_StdComponentCategoriesMgr))
191  return IClassFactory_QueryInterface(&ComCatCF, iid, ppv);
192 
193  hr = OLE32_DllGetClassObject(rclsid, iid, ppv);
194  if (SUCCEEDED(hr))
195  return hr;
196 
197  return Handler_DllGetClassObject(rclsid, iid, ppv);
198 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv) DECLSPEC_HIDDEN
Definition: marshal.c:2205
static IClassFactory ComCatCF
Definition: oleproxy.c:149
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) DECLSPEC_HIDDEN
static IClassFactory ItemMonikerCF
Definition: oleproxy.c:94
HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: compobj.c:5167
smooth NULL
Definition: ftsmooth.c:416
static const GUID CLSID_DfMarshal
Definition: marshal.c:63
static IClassFactory PointerMonikerCF
Definition: oleproxy.c:138
static IClassFactory CompositeMonikerCF
Definition: oleproxy.c:116
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
const CLSID CLSID_StdGlobalInterfaceTable
static IClassFactory ClassMonikerCF
Definition: oleproxy.c:127
static IClassFactory FileMonikerCF
Definition: oleproxy.c:83
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
HRESULT StdGlobalInterfaceTable_GetFactory(LPVOID *ppv) DECLSPEC_HIDDEN
Definition: git.c:344
const GUID IID_IClassFactory
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static IClassFactory AntiMonikerCF
Definition: oleproxy.c:105

◆ 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:631
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63

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:806
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63

Definition at line 118 of file oleproxy.c.

◆ ComCatCF

IClassFactory ComCatCF = { &ComCatCFVtbl }
static

Definition at line 149 of file oleproxy.c.

Referenced by DllGetClassObject().

◆ ComCatCFVtbl

const IClassFactoryVtbl ComCatCFVtbl
static
Initial value:
=
{
}
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63
HRESULT WINAPI ComCat_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppvObj)
Definition: comcat.c:702

Definition at line 140 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)
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63

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:
=
{
}
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63
HRESULT WINAPI FileMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
Definition: filemoniker.c:1543

Definition at line 74 of file oleproxy.c.

◆ GlobalOptionsCF

IClassFactory GlobalOptionsCF = { &GlobalOptionsCFVtbl }

Definition at line 160 of file oleproxy.c.

Referenced by CoGetClassObject().

◆ GlobalOptionsCFVtbl

const IClassFactoryVtbl GlobalOptionsCFVtbl
static
Initial value:
=
{
}
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63
HRESULT WINAPI GlobalOptions_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
Definition: compobj.c:5351

Definition at line 151 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:
=
{
}
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63
HRESULT WINAPI ItemMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk, REFIID riid, void **ppv)
Definition: itemmoniker.c:958

Definition at line 85 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)
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: oleproxy.c:58
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: oleproxy.c:68
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: oleproxy.c:44
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: oleproxy.c:63

Definition at line 129 of file oleproxy.c.