ReactOS 0.4.15-dev-8417-gb6b82fe
dxdiag_main.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "oleauto.h"
#include "oleidl.h"
#include "rpcproxy.h"
#include "initguid.h"
#include "dxdiag_private.h"
#include "wine/debug.h"
Include dependency graph for dxdiag_main.c:

Go to the source code of this file.

Classes

struct  IClassFactoryImpl
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (dxdiag)
 
BOOL WINAPI DllMain (HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
static HRESULT WINAPI DXDiagCF_QueryInterface (IClassFactory *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI DXDiagCF_AddRef (IClassFactory *iface)
 
static ULONG WINAPI DXDiagCF_Release (IClassFactory *iface)
 
static HRESULT WINAPI DXDiagCF_CreateInstance (IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
 
static HRESULT WINAPI DXDiagCF_LockServer (IClassFactory *iface, BOOL dolock)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 

Variables

HINSTANCE dxdiagn_instance = 0
 
LONG DXDIAGN_refCount = 0
 
static const IClassFactoryVtbl DXDiagCF_Vtbl
 
static IClassFactoryImpl DXDiag_CF = { { &DXDiagCF_Vtbl } }
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file dxdiag_main.c.

Function Documentation

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 133 of file dxdiag_main.c.

134{
135 return DXDIAGN_refCount != 0 ? S_FALSE : S_OK;
136}
LONG DXDIAGN_refCount
Definition: dxdiag_main.c:40
#define S_OK
Definition: intsafe.h:52
#define S_FALSE
Definition: winerror.h:2357

◆ DllGetClassObject()

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

Definition at line 141 of file dxdiag_main.c.

142{
143 TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
144
145 if (IsEqualGUID(rclsid, &CLSID_DxDiagProvider)) {
146 IClassFactory_AddRef(&DXDiag_CF.IClassFactory_iface);
148 return S_OK;
149 }
150
151 FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
153}
#define FIXME(fmt,...)
Definition: precomp.h:53
static IClassFactoryImpl DXDiag_CF
Definition: dxdiag_main.c:128
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define TRACE(s)
Definition: solgame.cpp:4
IClassFactory IClassFactory_iface
Definition: main.c:58
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hInstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 43 of file dxdiag_main.c.

44{
45 TRACE("%p,%x,%p\n", hInstDLL, fdwReason, lpvReserved);
46 if (fdwReason == DLL_PROCESS_ATTACH) {
47 dxdiagn_instance = hInstDLL;
49 }
50 return TRUE;
51}
#define TRUE
Definition: types.h:120
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
HINSTANCE dxdiagn_instance
Definition: dxdiag_main.c:38
static IN DWORD IN LPVOID lpvReserved

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 158 of file dxdiag_main.c.

159{
161}
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 166 of file dxdiag_main.c.

167{
169}
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110

◆ DXDiagCF_AddRef()

static ULONG WINAPI DXDiagCF_AddRef ( IClassFactory iface)
static

Definition at line 86 of file dxdiag_main.c.

87{
89
90 return 2; /* non-heap based object */
91}
static void DXDIAGN_LockModule(void)

◆ DXDiagCF_CreateInstance()

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

Definition at line 100 of file dxdiag_main.c.

102{
103 TRACE("(%p)->(%p,%s,%p)\n", iface, pOuter, debugstr_guid(riid), ppv);
104
105 return DXDiag_CreateDXDiagProvider(iface, pOuter, riid, ppv);
106}
HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN
Definition: provider.c:219

◆ DXDiagCF_LockServer()

static HRESULT WINAPI DXDiagCF_LockServer ( IClassFactory iface,
BOOL  dolock 
)
static

Definition at line 108 of file dxdiag_main.c.

109{
110 TRACE("(%d)\n", dolock);
111
112 if (dolock)
114 else
116
117 return S_OK;
118}
static void DXDIAGN_UnlockModule(void)

◆ DXDiagCF_QueryInterface()

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

Definition at line 60 of file dxdiag_main.c.

61{
62 if (ppv == NULL)
63 return E_POINTER;
64
66 TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
68 TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
69 else if (IsEqualGUID(&IID_IExternalConnection, riid) ||
70 IsEqualGUID(&IID_IMarshal, riid)) {
71 TRACE("(%p)->(%s) ignoring\n", iface, debugstr_guid(riid));
72 *ppv = NULL;
73 return E_NOINTERFACE;
74 }
75 else {
76 FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
77 *ppv = NULL;
78 return E_NOINTERFACE;
79 }
80
81 *ppv = iface;
82 IClassFactory_AddRef(iface);
83 return S_OK;
84}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define NULL
Definition: types.h:112
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365

◆ DXDiagCF_Release()

static ULONG WINAPI DXDiagCF_Release ( IClassFactory iface)
static

Definition at line 93 of file dxdiag_main.c.

94{
96
97 return 1; /* non-heap based object */
98}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( dxdiag  )

Variable Documentation

◆ DXDiag_CF

IClassFactoryImpl DXDiag_CF = { { &DXDiagCF_Vtbl } }
static

Definition at line 128 of file dxdiag_main.c.

Referenced by DllGetClassObject().

◆ DXDiagCF_Vtbl

const IClassFactoryVtbl DXDiagCF_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI DXDiagCF_LockServer(IClassFactory *iface, BOOL dolock)
Definition: dxdiag_main.c:108
static HRESULT WINAPI DXDiagCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
Definition: dxdiag_main.c:100
static ULONG WINAPI DXDiagCF_Release(IClassFactory *iface)
Definition: dxdiag_main.c:93
static HRESULT WINAPI DXDiagCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: dxdiag_main.c:60
static ULONG WINAPI DXDiagCF_AddRef(IClassFactory *iface)
Definition: dxdiag_main.c:86

Definition at line 120 of file dxdiag_main.c.

◆ dxdiagn_instance

◆ DXDIAGN_refCount

LONG DXDIAGN_refCount = 0

Definition at line 40 of file dxdiag_main.c.

Referenced by DllCanUnloadNow(), DXDIAGN_LockModule(), and DXDIAGN_UnlockModule().