ReactOS  0.4.14-dev-1338-g0d187f7
errorinfo.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "oleauto.h"
#include "winerror.h"
#include "compobj_private.h"
#include "wine/debug.h"
Include dependency graph for errorinfo.c:

Go to the source code of this file.

Classes

struct  ErrorInfoImpl
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct ErrorInfoImpl ErrorInfoImpl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ole)
 
static WCHARheap_strdupW (const WCHAR *str)
 
static ErrorInfoImplimpl_from_IErrorInfo (IErrorInfo *iface)
 
static ErrorInfoImplimpl_from_ICreateErrorInfo (ICreateErrorInfo *iface)
 
static ErrorInfoImplimpl_from_ISupportErrorInfo (ISupportErrorInfo *iface)
 
static HRESULT WINAPI IErrorInfoImpl_QueryInterface (IErrorInfo *iface, REFIID riid, void **ppvoid)
 
static ULONG WINAPI IErrorInfoImpl_AddRef (IErrorInfo *iface)
 
static ULONG WINAPI IErrorInfoImpl_Release (IErrorInfo *iface)
 
static HRESULT WINAPI IErrorInfoImpl_GetGUID (IErrorInfo *iface, GUID *pGUID)
 
static HRESULT WINAPI IErrorInfoImpl_GetSource (IErrorInfo *iface, BSTR *pBstrSource)
 
static HRESULT WINAPI IErrorInfoImpl_GetDescription (IErrorInfo *iface, BSTR *pBstrDescription)
 
static HRESULT WINAPI IErrorInfoImpl_GetHelpFile (IErrorInfo *iface, BSTR *pBstrHelpFile)
 
static HRESULT WINAPI IErrorInfoImpl_GetHelpContext (IErrorInfo *iface, DWORD *pdwHelpContext)
 
static HRESULT WINAPI ICreateErrorInfoImpl_QueryInterface (ICreateErrorInfo *iface, REFIID riid, VOID **ppvoid)
 
static ULONG WINAPI ICreateErrorInfoImpl_AddRef (ICreateErrorInfo *iface)
 
static ULONG WINAPI ICreateErrorInfoImpl_Release (ICreateErrorInfo *iface)
 
static HRESULT WINAPI ICreateErrorInfoImpl_SetGUID (ICreateErrorInfo *iface, REFGUID rguid)
 
static HRESULT WINAPI ICreateErrorInfoImpl_SetSource (ICreateErrorInfo *iface, LPOLESTR szSource)
 
static HRESULT WINAPI ICreateErrorInfoImpl_SetDescription (ICreateErrorInfo *iface, LPOLESTR szDescription)
 
static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpFile (ICreateErrorInfo *iface, LPOLESTR szHelpFile)
 
static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpContext (ICreateErrorInfo *iface, DWORD dwHelpContext)
 
static HRESULT WINAPI ISupportErrorInfoImpl_QueryInterface (ISupportErrorInfo *iface, REFIID riid, VOID **ppvoid)
 
static ULONG WINAPI ISupportErrorInfoImpl_AddRef (ISupportErrorInfo *iface)
 
static ULONG WINAPI ISupportErrorInfoImpl_Release (ISupportErrorInfo *iface)
 
static HRESULT WINAPI ISupportErrorInfoImpl_InterfaceSupportsErrorInfo (ISupportErrorInfo *iface, REFIID riid)
 
static IErrorInfoIErrorInfoImpl_Constructor (void)
 
HRESULT WINAPI CreateErrorInfo (ICreateErrorInfo **pperrinfo)
 
HRESULT WINAPI GetErrorInfo (ULONG dwReserved, IErrorInfo **pperrinfo)
 
HRESULT WINAPI SetErrorInfo (ULONG dwReserved, IErrorInfo *perrinfo)
 

Variables

static const IErrorInfoVtbl ErrorInfoVtbl
 
static const ICreateErrorInfoVtbl CreateErrorInfoVtbl
 
static const ISupportErrorInfoVtbl SupportErrorInfoVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 29 of file errorinfo.c.

Typedef Documentation

◆ ErrorInfoImpl

Function Documentation

◆ CreateErrorInfo()

HRESULT WINAPI CreateErrorInfo ( ICreateErrorInfo **  pperrinfo)

Definition at line 386 of file errorinfo.c.

387 {
388  IErrorInfo * pei;
389  HRESULT res;
390  TRACE("(%p)\n", pperrinfo);
391  if(! pperrinfo ) return E_INVALIDARG;
392  if(!(pei=IErrorInfoImpl_Constructor()))return E_OUTOFMEMORY;
393 
394  res = IErrorInfo_QueryInterface(pei, &IID_ICreateErrorInfo, (LPVOID*)pperrinfo);
395  IErrorInfo_Release(pei);
396  return res;
397 }
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static IErrorInfo * IErrorInfoImpl_Constructor(void)
Definition: errorinfo.c:356
LONG HRESULT
Definition: typedefs.h:78
GLuint res
Definition: glext.h:9613

Referenced by test_error_info().

◆ GetErrorInfo()

HRESULT WINAPI GetErrorInfo ( ULONG  dwReserved,
IErrorInfo **  pperrinfo 
)

Definition at line 417 of file errorinfo.c.

418 {
419  TRACE("(%d, %p, %p)\n", dwReserved, pperrinfo, COM_CurrentInfo()->errorinfo);
420 
421  if (dwReserved)
422  {
423  ERR("dwReserved (0x%x) != 0\n", dwReserved);
424  return E_INVALIDARG;
425  }
426 
427  if(!pperrinfo) return E_INVALIDARG;
428 
429  if (!COM_CurrentInfo()->errorinfo)
430  {
431  *pperrinfo = NULL;
432  return S_FALSE;
433  }
434 
435  *pperrinfo = COM_CurrentInfo()->errorinfo;
436 
437  /* clear thread error state */
438  COM_CurrentInfo()->errorinfo = NULL;
439  return S_OK;
440 }
static struct oletls * COM_CurrentInfo(void)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59

Referenced by _com_issue_errorex(), ITypeInfo_fnInvoke(), and test_error_info().

◆ heap_strdupW()

static WCHAR* heap_strdupW ( const WCHAR str)
inlinestatic

Definition at line 43 of file errorinfo.c.

44 {
45  WCHAR *ret = NULL;
46 
47  if(str) {
48  size_t size;
49 
50  size = (lstrlenW(str)+1)*sizeof(WCHAR);
51  ret = heap_alloc(size);
52  if(ret)
53  memcpy(ret, str, size);
54  }
55 
56  return ret;
57 }
#define lstrlenW
Definition: compat.h:415
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

Referenced by ICreateErrorInfoImpl_SetDescription(), ICreateErrorInfoImpl_SetHelpFile(), and ICreateErrorInfoImpl_SetSource().

◆ ICreateErrorInfoImpl_AddRef()

static ULONG WINAPI ICreateErrorInfoImpl_AddRef ( ICreateErrorInfo iface)
static

Definition at line 235 of file errorinfo.c.

237 {
239  return IErrorInfo_AddRef(&This->IErrorInfo_iface);
240 }
static ErrorInfoImpl * impl_from_ICreateErrorInfo(ICreateErrorInfo *iface)
Definition: errorinfo.c:78

◆ ICreateErrorInfoImpl_QueryInterface()

static HRESULT WINAPI ICreateErrorInfoImpl_QueryInterface ( ICreateErrorInfo iface,
REFIID  riid,
VOID **  ppvoid 
)
static

Definition at line 226 of file errorinfo.c.

230 {
232  return IErrorInfo_QueryInterface(&This->IErrorInfo_iface, riid, ppvoid);
233 }
REFIID riid
Definition: precomp.h:44
static ErrorInfoImpl * impl_from_ICreateErrorInfo(ICreateErrorInfo *iface)
Definition: errorinfo.c:78

◆ ICreateErrorInfoImpl_Release()

static ULONG WINAPI ICreateErrorInfoImpl_Release ( ICreateErrorInfo iface)
static

Definition at line 242 of file errorinfo.c.

244 {
246  return IErrorInfo_Release(&This->IErrorInfo_iface);
247 }
static ErrorInfoImpl * impl_from_ICreateErrorInfo(ICreateErrorInfo *iface)
Definition: errorinfo.c:78

◆ ICreateErrorInfoImpl_SetDescription()

static HRESULT WINAPI ICreateErrorInfoImpl_SetDescription ( ICreateErrorInfo iface,
LPOLESTR  szDescription 
)
static

Definition at line 273 of file errorinfo.c.

276 {
278  TRACE("(%p): %s\n",This, debugstr_w(szDescription));
279 
280  heap_free(This->description);
281  This->description = heap_strdupW(szDescription);
282  return S_OK;
283 }
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: errorinfo.c:43
static ErrorInfoImpl * impl_from_ICreateErrorInfo(ICreateErrorInfo *iface)
Definition: errorinfo.c:78
#define S_OK
Definition: intsafe.h:59
static const WCHAR szDescription[]
Definition: provider.c:55
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ ICreateErrorInfoImpl_SetGUID()

static HRESULT WINAPI ICreateErrorInfoImpl_SetGUID ( ICreateErrorInfo iface,
REFGUID  rguid 
)
static

Definition at line 250 of file errorinfo.c.

253 {
255  TRACE("(%p)->(%s)\n", This, debugstr_guid(rguid));
256  This->m_Guid = *rguid;
257  return S_OK;
258 }
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static ErrorInfoImpl * impl_from_ICreateErrorInfo(ICreateErrorInfo *iface)
Definition: errorinfo.c:78
#define S_OK
Definition: intsafe.h:59

◆ ICreateErrorInfoImpl_SetHelpContext()

static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpContext ( ICreateErrorInfo iface,
DWORD  dwHelpContext 
)
static

Definition at line 296 of file errorinfo.c.

299 {
301  TRACE("(%p,%d)\n",This,dwHelpContext);
302  This->m_dwHelpContext = dwHelpContext;
303  return S_OK;
304 }
#define TRACE(s)
Definition: solgame.cpp:4
static ErrorInfoImpl * impl_from_ICreateErrorInfo(ICreateErrorInfo *iface)
Definition: errorinfo.c:78
#define S_OK
Definition: intsafe.h:59

◆ ICreateErrorInfoImpl_SetHelpFile()

static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpFile ( ICreateErrorInfo iface,
LPOLESTR  szHelpFile 
)
static

Definition at line 285 of file errorinfo.c.

288 {
290  TRACE("(%p,%s)\n",This,debugstr_w(szHelpFile));
291  heap_free(This->help_file);
292  This->help_file = heap_strdupW(szHelpFile);
293  return S_OK;
294 }
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
TCHAR szHelpFile[]
Definition: scrnsave.c:30
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: errorinfo.c:43
static ErrorInfoImpl * impl_from_ICreateErrorInfo(ICreateErrorInfo *iface)
Definition: errorinfo.c:78
#define S_OK
Definition: intsafe.h:59
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ ICreateErrorInfoImpl_SetSource()

static HRESULT WINAPI ICreateErrorInfoImpl_SetSource ( ICreateErrorInfo iface,
LPOLESTR  szSource 
)
static

Definition at line 260 of file errorinfo.c.

263 {
265  TRACE("(%p): %s\n",This, debugstr_w(szSource));
266 
267  heap_free(This->source);
268  This->source = heap_strdupW(szSource);
269 
270  return S_OK;
271 }
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: errorinfo.c:43
static const WCHAR szSource[]
Definition: automation.c:501
static ErrorInfoImpl * impl_from_ICreateErrorInfo(ICreateErrorInfo *iface)
Definition: errorinfo.c:78
#define S_OK
Definition: intsafe.h:59
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ IErrorInfoImpl_AddRef()

static ULONG WINAPI IErrorInfoImpl_AddRef ( IErrorInfo iface)
static

Definition at line 121 of file errorinfo.c.

123 {
125  TRACE("(%p)->(count=%u)\n",This,This->ref);
126  return InterlockedIncrement(&This->ref);
127 }
static ErrorInfoImpl * impl_from_IErrorInfo(IErrorInfo *iface)
Definition: errorinfo.c:73
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ IErrorInfoImpl_Constructor()

static IErrorInfo* IErrorInfoImpl_Constructor ( void  )
static

Definition at line 356 of file errorinfo.c.

357 {
359 
360  if (!This) return NULL;
361 
362  This->IErrorInfo_iface.lpVtbl = &ErrorInfoVtbl;
363  This->ICreateErrorInfo_iface.lpVtbl = &CreateErrorInfoVtbl;
364  This->ISupportErrorInfo_iface.lpVtbl = &SupportErrorInfoVtbl;
365  This->ref = 1;
366  This->source = NULL;
367  This->description = NULL;
368  This->help_file = NULL;
369  This->m_dwHelpContext = 0;
370 
371  return &This->IErrorInfo_iface;
372 }
static const ISupportErrorInfoVtbl SupportErrorInfoVtbl
Definition: errorinfo.c:348
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
static const IErrorInfoVtbl ErrorInfoVtbl
Definition: errorinfo.c:213
static const ICreateErrorInfoVtbl CreateErrorInfoVtbl
Definition: errorinfo.c:306

Referenced by CreateErrorInfo().

◆ IErrorInfoImpl_GetDescription()

static HRESULT WINAPI IErrorInfoImpl_GetDescription ( IErrorInfo iface,
BSTR pBstrDescription 
)
static

Definition at line 172 of file errorinfo.c.

175 {
177 
178  TRACE("(%p)->(pBstrDescription=%p)\n",This,pBstrDescription);
179  if (pBstrDescription == NULL)
180  return E_INVALIDARG;
181  *pBstrDescription = SysAllocString(This->description);
182 
183  return S_OK;
184 }
static ErrorInfoImpl * impl_from_IErrorInfo(IErrorInfo *iface)
Definition: errorinfo.c:73
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ IErrorInfoImpl_GetGUID()

static HRESULT WINAPI IErrorInfoImpl_GetGUID ( IErrorInfo iface,
GUID pGUID 
)
static

Definition at line 149 of file errorinfo.c.

152 {
154  TRACE("(%p)->(count=%u)\n",This,This->ref);
155  if(!pGUID )return E_INVALIDARG;
156  *pGUID = This->m_Guid;
157  return S_OK;
158 }
static ErrorInfoImpl * impl_from_IErrorInfo(IErrorInfo *iface)
Definition: errorinfo.c:73
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ IErrorInfoImpl_GetHelpContext()

static HRESULT WINAPI IErrorInfoImpl_GetHelpContext ( IErrorInfo iface,
DWORD pdwHelpContext 
)
static

Definition at line 200 of file errorinfo.c.

203 {
205  TRACE("(%p)->(pdwHelpContext=%p)\n",This, pdwHelpContext);
206  if (pdwHelpContext == NULL)
207  return E_INVALIDARG;
208  *pdwHelpContext = This->m_dwHelpContext;
209 
210  return S_OK;
211 }
static ErrorInfoImpl * impl_from_IErrorInfo(IErrorInfo *iface)
Definition: errorinfo.c:73
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ IErrorInfoImpl_GetHelpFile()

static HRESULT WINAPI IErrorInfoImpl_GetHelpFile ( IErrorInfo iface,
BSTR pBstrHelpFile 
)
static

Definition at line 186 of file errorinfo.c.

189 {
191 
192  TRACE("(%p)->(pBstrHelpFile=%p)\n",This, pBstrHelpFile);
193  if (pBstrHelpFile == NULL)
194  return E_INVALIDARG;
195  *pBstrHelpFile = SysAllocString(This->help_file);
196 
197  return S_OK;
198 }
static ErrorInfoImpl * impl_from_IErrorInfo(IErrorInfo *iface)
Definition: errorinfo.c:73
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ IErrorInfoImpl_GetSource()

static HRESULT WINAPI IErrorInfoImpl_GetSource ( IErrorInfo iface,
BSTR pBstrSource 
)
static

Definition at line 160 of file errorinfo.c.

163 {
165  TRACE("(%p)->(pBstrSource=%p)\n",This,pBstrSource);
166  if (pBstrSource == NULL)
167  return E_INVALIDARG;
168  *pBstrSource = SysAllocString(This->source);
169  return S_OK;
170 }
static ErrorInfoImpl * impl_from_IErrorInfo(IErrorInfo *iface)
Definition: errorinfo.c:73
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ IErrorInfoImpl_QueryInterface()

static HRESULT WINAPI IErrorInfoImpl_QueryInterface ( IErrorInfo iface,
REFIID  riid,
void **  ppvoid 
)
static

Definition at line 88 of file errorinfo.c.

92 {
94  TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid),ppvoid);
95 
96  *ppvoid = NULL;
97 
98  if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IErrorInfo))
99  {
100  *ppvoid = &This->IErrorInfo_iface;
101  }
102  else if(IsEqualIID(riid, &IID_ICreateErrorInfo))
103  {
104  *ppvoid = &This->ICreateErrorInfo_iface;
105  }
106  else if(IsEqualIID(riid, &IID_ISupportErrorInfo))
107  {
108  *ppvoid = &This->ISupportErrorInfo_iface;
109  }
110 
111  if(*ppvoid)
112  {
113  IUnknown_AddRef( (IUnknown*)*ppvoid );
114  TRACE("-- Interface: (%p)->(%p)\n",ppvoid,*ppvoid);
115  return S_OK;
116  }
117  TRACE("-- Interface: E_NOINTERFACE\n");
118  return E_NOINTERFACE;
119 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static ErrorInfoImpl * impl_from_IErrorInfo(IErrorInfo *iface)
Definition: errorinfo.c:73
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
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IErrorInfoImpl_Release()

static ULONG WINAPI IErrorInfoImpl_Release ( IErrorInfo iface)
static

Definition at line 129 of file errorinfo.c.

131 {
134 
135  TRACE("(%p)->(count=%u)\n",This,ref+1);
136 
137  if (!ref)
138  {
139  TRACE("-- destroying IErrorInfo(%p)\n",This);
140 
141  heap_free(This->source);
142  heap_free(This->description);
143  heap_free(This->help_file);
144  heap_free(This);
145  }
146  return ref;
147 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static ErrorInfoImpl * impl_from_IErrorInfo(IErrorInfo *iface)
Definition: errorinfo.c:73
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ impl_from_ICreateErrorInfo()

static ErrorInfoImpl* impl_from_ICreateErrorInfo ( ICreateErrorInfo iface)
inlinestatic

Definition at line 78 of file errorinfo.c.

79 {
80  return CONTAINING_RECORD(iface, ErrorInfoImpl, ICreateErrorInfo_iface);
81 }
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 ICreateErrorInfoImpl_AddRef(), ICreateErrorInfoImpl_QueryInterface(), ICreateErrorInfoImpl_Release(), ICreateErrorInfoImpl_SetDescription(), ICreateErrorInfoImpl_SetGUID(), ICreateErrorInfoImpl_SetHelpContext(), ICreateErrorInfoImpl_SetHelpFile(), and ICreateErrorInfoImpl_SetSource().

◆ impl_from_IErrorInfo()

static ErrorInfoImpl* impl_from_IErrorInfo ( IErrorInfo iface)
inlinestatic

Definition at line 73 of file errorinfo.c.

74 {
75  return CONTAINING_RECORD(iface, ErrorInfoImpl, IErrorInfo_iface);
76 }
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 IErrorInfoImpl_AddRef(), IErrorInfoImpl_GetDescription(), IErrorInfoImpl_GetGUID(), IErrorInfoImpl_GetHelpContext(), IErrorInfoImpl_GetHelpFile(), IErrorInfoImpl_GetSource(), IErrorInfoImpl_QueryInterface(), and IErrorInfoImpl_Release().

◆ impl_from_ISupportErrorInfo()

static ErrorInfoImpl* impl_from_ISupportErrorInfo ( ISupportErrorInfo iface)
inlinestatic

Definition at line 83 of file errorinfo.c.

84 {
85  return CONTAINING_RECORD(iface, ErrorInfoImpl, ISupportErrorInfo_iface);
86 }
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 ISupportErrorInfoImpl_AddRef(), ISupportErrorInfoImpl_InterfaceSupportsErrorInfo(), ISupportErrorInfoImpl_QueryInterface(), and ISupportErrorInfoImpl_Release().

◆ ISupportErrorInfoImpl_AddRef()

static ULONG WINAPI ISupportErrorInfoImpl_AddRef ( ISupportErrorInfo iface)
static

Definition at line 327 of file errorinfo.c.

328 {
330  return IErrorInfo_AddRef(&This->IErrorInfo_iface);
331 }
static ErrorInfoImpl * impl_from_ISupportErrorInfo(ISupportErrorInfo *iface)
Definition: errorinfo.c:83

◆ ISupportErrorInfoImpl_InterfaceSupportsErrorInfo()

static HRESULT WINAPI ISupportErrorInfoImpl_InterfaceSupportsErrorInfo ( ISupportErrorInfo iface,
REFIID  riid 
)
static

Definition at line 339 of file errorinfo.c.

342 {
344  TRACE("(%p)->(%s)\n", This, debugstr_guid(riid));
345  return (IsEqualIID(riid, &This->m_Guid)) ? S_OK : S_FALSE;
346 }
REFIID riid
Definition: precomp.h:44
#define S_FALSE
Definition: winerror.h:2357
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static ErrorInfoImpl * impl_from_ISupportErrorInfo(ISupportErrorInfo *iface)
Definition: errorinfo.c:83
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ ISupportErrorInfoImpl_QueryInterface()

static HRESULT WINAPI ISupportErrorInfoImpl_QueryInterface ( ISupportErrorInfo iface,
REFIID  riid,
VOID **  ppvoid 
)
static

Definition at line 318 of file errorinfo.c.

322 {
324  return IErrorInfo_QueryInterface(&This->IErrorInfo_iface, riid, ppvoid);
325 }
REFIID riid
Definition: precomp.h:44
static ErrorInfoImpl * impl_from_ISupportErrorInfo(ISupportErrorInfo *iface)
Definition: errorinfo.c:83

◆ ISupportErrorInfoImpl_Release()

static ULONG WINAPI ISupportErrorInfoImpl_Release ( ISupportErrorInfo iface)
static

Definition at line 333 of file errorinfo.c.

334 {
336  return IErrorInfo_Release(&This->IErrorInfo_iface);
337 }
static ErrorInfoImpl * impl_from_ISupportErrorInfo(ISupportErrorInfo *iface)
Definition: errorinfo.c:83

◆ SetErrorInfo()

HRESULT WINAPI SetErrorInfo ( ULONG  dwReserved,
IErrorInfo perrinfo 
)

Definition at line 455 of file errorinfo.c.

456 {
457  IErrorInfo * pei;
458 
459  TRACE("(%d, %p)\n", dwReserved, perrinfo);
460 
461  if (dwReserved)
462  {
463  ERR("dwReserved (0x%x) != 0\n", dwReserved);
464  return E_INVALIDARG;
465  }
466 
467  /* release old errorinfo */
468  pei = COM_CurrentInfo()->errorinfo;
469  if (pei) IErrorInfo_Release(pei);
470 
471  /* set to new value */
472  COM_CurrentInfo()->errorinfo = perrinfo;
473  if (perrinfo) IErrorInfo_AddRef(perrinfo);
474 
475  return S_OK;
476 }
static struct oletls * COM_CurrentInfo(void)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59

Referenced by test_error_info().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )

Variable Documentation

◆ CreateErrorInfoVtbl

const ICreateErrorInfoVtbl CreateErrorInfoVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpContext(ICreateErrorInfo *iface, DWORD dwHelpContext)
Definition: errorinfo.c:296
static HRESULT WINAPI ICreateErrorInfoImpl_QueryInterface(ICreateErrorInfo *iface, REFIID riid, VOID **ppvoid)
Definition: errorinfo.c:226
static ULONG WINAPI ICreateErrorInfoImpl_AddRef(ICreateErrorInfo *iface)
Definition: errorinfo.c:235
static HRESULT WINAPI ICreateErrorInfoImpl_SetDescription(ICreateErrorInfo *iface, LPOLESTR szDescription)
Definition: errorinfo.c:273
static HRESULT WINAPI ICreateErrorInfoImpl_SetSource(ICreateErrorInfo *iface, LPOLESTR szSource)
Definition: errorinfo.c:260
static ULONG WINAPI ICreateErrorInfoImpl_Release(ICreateErrorInfo *iface)
Definition: errorinfo.c:242
static HRESULT WINAPI ICreateErrorInfoImpl_SetGUID(ICreateErrorInfo *iface, REFGUID rguid)
Definition: errorinfo.c:250
static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpFile(ICreateErrorInfo *iface, LPOLESTR szHelpFile)
Definition: errorinfo.c:285

Definition at line 306 of file errorinfo.c.

Referenced by IErrorInfoImpl_Constructor().

◆ ErrorInfoVtbl

const IErrorInfoVtbl ErrorInfoVtbl
static
Initial value:
=
{
}
static ULONG WINAPI IErrorInfoImpl_AddRef(IErrorInfo *iface)
Definition: errorinfo.c:121
static HRESULT WINAPI IErrorInfoImpl_QueryInterface(IErrorInfo *iface, REFIID riid, void **ppvoid)
Definition: errorinfo.c:88
static HRESULT WINAPI IErrorInfoImpl_GetSource(IErrorInfo *iface, BSTR *pBstrSource)
Definition: errorinfo.c:160
static ULONG WINAPI IErrorInfoImpl_Release(IErrorInfo *iface)
Definition: errorinfo.c:129
static HRESULT WINAPI IErrorInfoImpl_GetDescription(IErrorInfo *iface, BSTR *pBstrDescription)
Definition: errorinfo.c:172
static HRESULT WINAPI IErrorInfoImpl_GetHelpFile(IErrorInfo *iface, BSTR *pBstrHelpFile)
Definition: errorinfo.c:186
static HRESULT WINAPI IErrorInfoImpl_GetHelpContext(IErrorInfo *iface, DWORD *pdwHelpContext)
Definition: errorinfo.c:200
static HRESULT WINAPI IErrorInfoImpl_GetGUID(IErrorInfo *iface, GUID *pGUID)
Definition: errorinfo.c:149

Definition at line 213 of file errorinfo.c.

Referenced by IErrorInfoImpl_Constructor().

◆ SupportErrorInfoVtbl

const ISupportErrorInfoVtbl SupportErrorInfoVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ISupportErrorInfoImpl_QueryInterface(ISupportErrorInfo *iface, REFIID riid, VOID **ppvoid)
Definition: errorinfo.c:318
static ULONG WINAPI ISupportErrorInfoImpl_Release(ISupportErrorInfo *iface)
Definition: errorinfo.c:333
static ULONG WINAPI ISupportErrorInfoImpl_AddRef(ISupportErrorInfo *iface)
Definition: errorinfo.c:327
static HRESULT WINAPI ISupportErrorInfoImpl_InterfaceSupportsErrorInfo(ISupportErrorInfo *iface, REFIID riid)
Definition: errorinfo.c:339

Definition at line 348 of file errorinfo.c.

Referenced by IErrorInfoImpl_Constructor().