ReactOS  0.4.15-dev-1374-g8d3e80e
parseerror.c File Reference
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winuser.h"
#include "ole2.h"
#include "msxml6.h"
#include "msxml_private.h"
#include "wine/debug.h"
Include dependency graph for parseerror.c:

Go to the source code of this file.

Classes

struct  parse_error_t
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static parse_error_timpl_from_IXMLDOMParseError2 (IXMLDOMParseError2 *iface)
 
static HRESULT WINAPI parseError_QueryInterface (IXMLDOMParseError2 *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI parseError_AddRef (IXMLDOMParseError2 *iface)
 
static ULONG WINAPI parseError_Release (IXMLDOMParseError2 *iface)
 
static HRESULT WINAPI parseError_GetTypeInfoCount (IXMLDOMParseError2 *iface, UINT *pctinfo)
 
static HRESULT WINAPI parseError_GetTypeInfo (IXMLDOMParseError2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI parseError_GetIDsOfNames (IXMLDOMParseError2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI parseError_Invoke (IXMLDOMParseError2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI parseError_get_errorCode (IXMLDOMParseError2 *iface, LONG *code)
 
static HRESULT WINAPI parseError_get_url (IXMLDOMParseError2 *iface, BSTR *url)
 
static HRESULT WINAPI parseError_get_reason (IXMLDOMParseError2 *iface, BSTR *reason)
 
static HRESULT WINAPI parseError_get_srcText (IXMLDOMParseError2 *iface, BSTR *srcText)
 
static HRESULT WINAPI parseError_get_line (IXMLDOMParseError2 *iface, LONG *line)
 
static HRESULT WINAPI parseError_get_linepos (IXMLDOMParseError2 *iface, LONG *linepos)
 
static HRESULT WINAPI parseError_get_filepos (IXMLDOMParseError2 *iface, LONG *filepos)
 
static HRESULT WINAPI parseError_get_errorXPath (IXMLDOMParseError2 *iface, BSTR *xpathexpr)
 
static HRESULT WINAPI parseError_get_AllErrors (IXMLDOMParseError2 *iface, IXMLDOMParseErrorCollection **allErrors)
 
static HRESULT WINAPI parseError_errorParameters (IXMLDOMParseError2 *iface, LONG index, BSTR *param)
 
static HRESULT WINAPI parseError_get_errorParametersCount (IXMLDOMParseError2 *iface, LONG *count)
 
IXMLDOMParseErrorcreate_parseError (LONG code, BSTR url, BSTR reason, BSTR srcText, LONG line, LONG linepos, LONG filepos)
 

Variables

static const struct IXMLDOMParseError2Vtbl XMLDOMParseError2Vtbl
 
static const tid_t parseError_iface_tids []
 
static dispex_static_data_t parseError_dispex
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file parseerror.c.

Function Documentation

◆ create_parseError()

IXMLDOMParseError* create_parseError ( LONG  code,
BSTR  url,
BSTR  reason,
BSTR  srcText,
LONG  line,
LONG  linepos,
LONG  filepos 
)

Definition at line 329 of file parseerror.c.

331 {
333 
334  This = heap_alloc( sizeof(*This) );
335  if ( !This )
336  return NULL;
337 
338  This->IXMLDOMParseError2_iface.lpVtbl = &XMLDOMParseError2Vtbl;
339  This->ref = 1;
340 
341  This->code = code;
342  This->url = url;
343  This->reason = reason;
344  This->srcText = srcText;
345  This->line = line;
346  This->linepos = linepos;
347  This->filepos = filepos;
348 
349  init_dispex(&This->dispex, (IUnknown*)&This->IXMLDOMParseError2_iface, &parseError_dispex);
350 
351  return (IXMLDOMParseError*)&This->IXMLDOMParseError2_iface;
352 }
static const struct IXMLDOMParseError2Vtbl XMLDOMParseError2Vtbl
Definition: parseerror.c:295
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static const WCHAR url[]
Definition: encode.c:1432
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
static dispex_static_data_t parseError_dispex
Definition: parseerror.c:322
char line[200]
Definition: main.c:97
int code
Definition: main.c:75
#define NULL
Definition: types.h:112
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919

◆ impl_from_IXMLDOMParseError2()

static parse_error_t* impl_from_IXMLDOMParseError2 ( IXMLDOMParseError2 *  iface)
inlinestatic

Definition at line 54 of file parseerror.c.

55 {
56  return CONTAINING_RECORD(iface, parse_error_t, IXMLDOMParseError2_iface);
57 }
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 parseError_AddRef(), parseError_errorParameters(), parseError_get_AllErrors(), parseError_get_errorCode(), parseError_get_errorParametersCount(), parseError_get_errorXPath(), parseError_get_filepos(), parseError_get_line(), parseError_get_linepos(), parseError_get_reason(), parseError_get_srcText(), parseError_get_url(), parseError_GetIDsOfNames(), parseError_GetTypeInfo(), parseError_GetTypeInfoCount(), parseError_Invoke(), parseError_QueryInterface(), and parseError_Release().

◆ parseError_AddRef()

static ULONG WINAPI parseError_AddRef ( IXMLDOMParseError2 *  iface)
static

Definition at line 91 of file parseerror.c.

93 {
96  TRACE("(%p)->(%d)\n", This, ref);
97  return ref;
98 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ parseError_errorParameters()

static HRESULT WINAPI parseError_errorParameters ( IXMLDOMParseError2 *  iface,
LONG  index,
BSTR param 
)
static

Definition at line 276 of file parseerror.c.

280 {
282  FIXME("(%p)->(%p)\n", This, param);
283  return E_NOTIMPL;
284 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define FIXME(fmt,...)
Definition: debug.h:111
GLfloat param
Definition: glext.h:5796
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ parseError_get_AllErrors()

static HRESULT WINAPI parseError_get_AllErrors ( IXMLDOMParseError2 *  iface,
IXMLDOMParseErrorCollection **  allErrors 
)
static

Definition at line 267 of file parseerror.c.

270 {
272  FIXME("(%p)->(%p)\n", This, allErrors);
273  return E_NOTIMPL;
274 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ parseError_get_errorCode()

static HRESULT WINAPI parseError_get_errorCode ( IXMLDOMParseError2 *  iface,
LONG code 
)
static

Definition at line 166 of file parseerror.c.

169 {
171  TRACE("(%p)->(%p)\n", This, code);
172 
173  *code = This->code;
174 
175  if(This->code == 0)
176  return S_FALSE;
177 
178  return S_OK;
179 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
Definition: inflate.c:139
#define S_OK
Definition: intsafe.h:51

◆ parseError_get_errorParametersCount()

static HRESULT WINAPI parseError_get_errorParametersCount ( IXMLDOMParseError2 *  iface,
LONG count 
)
static

Definition at line 286 of file parseerror.c.

289 {
291  FIXME("(%p)->(%p)\n", This, count);
292  return E_NOTIMPL;
293 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ parseError_get_errorXPath()

static HRESULT WINAPI parseError_get_errorXPath ( IXMLDOMParseError2 *  iface,
BSTR xpathexpr 
)
static

Definition at line 258 of file parseerror.c.

261 {
263  FIXME("(%p)->(%p)\n", This, xpathexpr);
264  return E_NOTIMPL;
265 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ parseError_get_filepos()

static HRESULT WINAPI parseError_get_filepos ( IXMLDOMParseError2 *  iface,
LONG filepos 
)
static

Definition at line 249 of file parseerror.c.

252 {
254  FIXME("(%p)->(%p)\n", This, filepos);
255  return E_NOTIMPL;
256 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ parseError_get_line()

static HRESULT WINAPI parseError_get_line ( IXMLDOMParseError2 *  iface,
LONG line 
)
static

Definition at line 221 of file parseerror.c.

224 {
226 
227  TRACE("(%p)->(%p): stub\n", This, line);
228 
229  if (!line) return E_INVALIDARG;
230 
231  *line = This->line;
232  return S_OK;
233 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define E_INVALIDARG
Definition: ddrawi.h:101
Definition: parser.c:48
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ parseError_get_linepos()

static HRESULT WINAPI parseError_get_linepos ( IXMLDOMParseError2 *  iface,
LONG linepos 
)
static

Definition at line 235 of file parseerror.c.

238 {
240 
241  TRACE("(%p)->(%p)\n", This, linepos);
242 
243  if (!linepos) return E_INVALIDARG;
244 
245  *linepos = This->linepos;
246  return S_OK;
247 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ parseError_get_reason()

static HRESULT WINAPI parseError_get_reason ( IXMLDOMParseError2 *  iface,
BSTR reason 
)
static

Definition at line 190 of file parseerror.c.

193 {
195  TRACE("(%p)->(%p)\n", This, reason);
196 
197  if(!This->reason)
198  {
199  *reason = NULL;
200  return S_FALSE;
201  }
202  *reason = SysAllocString(This->reason);
203  return S_OK;
204 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define S_FALSE
Definition: winerror.h:2357
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define TRACE(s)
Definition: solgame.cpp:4
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112

◆ parseError_get_srcText()

static HRESULT WINAPI parseError_get_srcText ( IXMLDOMParseError2 *  iface,
BSTR srcText 
)
static

Definition at line 206 of file parseerror.c.

209 {
211 
212  TRACE("(%p)->(%p)\n", This, srcText);
213 
214  if (!srcText) return E_INVALIDARG;
215 
216  *srcText = SysAllocString(This->srcText);
217 
218  return S_OK;
219 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define E_INVALIDARG
Definition: ddrawi.h:101
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ parseError_get_url()

static HRESULT WINAPI parseError_get_url ( IXMLDOMParseError2 *  iface,
BSTR url 
)
static

Definition at line 181 of file parseerror.c.

184 {
186  FIXME("(%p)->(%p)\n", This, url);
187  return E_NOTIMPL;
188 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define FIXME(fmt,...)
Definition: debug.h:111
static const WCHAR url[]
Definition: encode.c:1432
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ parseError_GetIDsOfNames()

static HRESULT WINAPI parseError_GetIDsOfNames ( IXMLDOMParseError2 *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 137 of file parseerror.c.

144 {
146  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
147  riid, rgszNames, cNames, lcid, rgDispId);
148 }
REFIID riid
Definition: precomp.h:44
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54

◆ parseError_GetTypeInfo()

static HRESULT WINAPI parseError_GetTypeInfo ( IXMLDOMParseError2 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 126 of file parseerror.c.

131 {
133  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
134  iTInfo, lcid, ppTInfo);
135 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54

◆ parseError_GetTypeInfoCount()

static HRESULT WINAPI parseError_GetTypeInfoCount ( IXMLDOMParseError2 *  iface,
UINT pctinfo 
)
static

Definition at line 118 of file parseerror.c.

121 {
123  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
124 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54

◆ parseError_Invoke()

static HRESULT WINAPI parseError_Invoke ( IXMLDOMParseError2 *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 150 of file parseerror.c.

160 {
162  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
163  dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
164 }
REFIID riid
Definition: precomp.h:44
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534

◆ parseError_QueryInterface()

static HRESULT WINAPI parseError_QueryInterface ( IXMLDOMParseError2 *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 59 of file parseerror.c.

63 {
65 
66  TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
67 
68  if ( IsEqualGUID( riid, &IID_IUnknown ) ||
70  IsEqualGUID( riid, &IID_IXMLDOMParseError ) ||
71  IsEqualGUID( riid, &IID_IXMLDOMParseError2 ) )
72  {
73  *ppvObject = iface;
74  }
75  else if (dispex_query_interface(&This->dispex, riid, ppvObject))
76  {
77  return *ppvObject ? S_OK : E_NOINTERFACE;
78  }
79  else
80  {
81  FIXME("interface %s not implemented\n", debugstr_guid(riid));
82  *ppvObject = NULL;
83  return E_NOINTERFACE;
84  }
85 
86  IXMLDOMParseError2_AddRef( iface );
87 
88  return S_OK;
89 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:51
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ parseError_Release()

static ULONG WINAPI parseError_Release ( IXMLDOMParseError2 *  iface)
static

Definition at line 100 of file parseerror.c.

102 {
104  ULONG ref = InterlockedDecrement( &This->ref );
105 
106  TRACE("(%p)->(%d)\n", This, ref);
107  if ( ref == 0 )
108  {
109  SysFreeString(This->url);
110  SysFreeString(This->reason);
111  SysFreeString(This->srcText);
112  heap_free( This );
113  }
114 
115  return ref;
116 }
static parse_error_t * impl_from_IXMLDOMParseError2(IXMLDOMParseError2 *iface)
Definition: parseerror.c:54
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

Variable Documentation

◆ parseError_dispex

dispex_static_data_t parseError_dispex
static
Initial value:
= {
}
static const tid_t parseError_iface_tids[]
Definition: parseerror.c:317
#define NULL
Definition: types.h:112

Definition at line 322 of file parseerror.c.

Referenced by create_parseError().

◆ parseError_iface_tids

const tid_t parseError_iface_tids[]
static
Initial value:

Definition at line 317 of file parseerror.c.

◆ XMLDOMParseError2Vtbl

const struct IXMLDOMParseError2Vtbl XMLDOMParseError2Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI parseError_get_errorXPath(IXMLDOMParseError2 *iface, BSTR *xpathexpr)
Definition: parseerror.c:258
static ULONG WINAPI parseError_AddRef(IXMLDOMParseError2 *iface)
Definition: parseerror.c:91
static HRESULT WINAPI parseError_get_reason(IXMLDOMParseError2 *iface, BSTR *reason)
Definition: parseerror.c:190
static HRESULT WINAPI parseError_get_errorParametersCount(IXMLDOMParseError2 *iface, LONG *count)
Definition: parseerror.c:286
static HRESULT WINAPI parseError_get_line(IXMLDOMParseError2 *iface, LONG *line)
Definition: parseerror.c:221
static HRESULT WINAPI parseError_get_linepos(IXMLDOMParseError2 *iface, LONG *linepos)
Definition: parseerror.c:235
static HRESULT WINAPI parseError_QueryInterface(IXMLDOMParseError2 *iface, REFIID riid, void **ppvObject)
Definition: parseerror.c:59
static HRESULT WINAPI parseError_get_AllErrors(IXMLDOMParseError2 *iface, IXMLDOMParseErrorCollection **allErrors)
Definition: parseerror.c:267
static HRESULT WINAPI parseError_get_url(IXMLDOMParseError2 *iface, BSTR *url)
Definition: parseerror.c:181
static HRESULT WINAPI parseError_get_srcText(IXMLDOMParseError2 *iface, BSTR *srcText)
Definition: parseerror.c:206
static HRESULT WINAPI parseError_GetIDsOfNames(IXMLDOMParseError2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: parseerror.c:137
static HRESULT WINAPI parseError_Invoke(IXMLDOMParseError2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: parseerror.c:150
static HRESULT WINAPI parseError_get_errorCode(IXMLDOMParseError2 *iface, LONG *code)
Definition: parseerror.c:166
static ULONG WINAPI parseError_Release(IXMLDOMParseError2 *iface)
Definition: parseerror.c:100
static HRESULT WINAPI parseError_GetTypeInfo(IXMLDOMParseError2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: parseerror.c:126
static HRESULT WINAPI parseError_GetTypeInfoCount(IXMLDOMParseError2 *iface, UINT *pctinfo)
Definition: parseerror.c:118
static HRESULT WINAPI parseError_errorParameters(IXMLDOMParseError2 *iface, LONG index, BSTR *param)
Definition: parseerror.c:276
static HRESULT WINAPI parseError_get_filepos(IXMLDOMParseError2 *iface, LONG *filepos)
Definition: parseerror.c:249

Definition at line 295 of file parseerror.c.

Referenced by create_parseError().