ReactOS 0.4.16-dev-2135-g2f5a67f
schema.c File Reference
#include <stdio.h>
#include <assert.h>
#include "ole2.h"
#include "msxml6.h"
#include "msxml6did.h"
#include "dispex.h"
#include "wine/test.h"
#include "initguid.h"
Include dependency graph for schema.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define check_interface(a, b, c)   check_interface_(__LINE__, a, b, c)
 

Functions

 DEFINE_GUID (GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
static void check_interface_ (unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
 
static BSTR _bstr_ (const WCHAR *str)
 
static void free_bstrs (void)
 
static IXMLDOMDocument2create_document (void)
 
static voidcreate_cache (REFIID riid)
 
static HRESULT validate_regex_document (IXMLDOMDocument2 *doc, IXMLDOMDocument2 *schema, IXMLDOMSchemaCollection *cache, const WCHAR *regex, const WCHAR *input)
 
static void test_regex (void)
 
static void test_get (void)
 
static void test_ifaces (void)
 
static void test_remove (void)
 
static void test_obj_dispex (IUnknown *obj)
 
static void test_dispex (void)
 
static void test_validate_on_load (void)
 
 START_TEST (schema)
 

Variables

static const WCHAR xsd_schema1_uri [] = L"x-schema:test1.xsd"
 
static const WCHAR xsd_schema1_xml []
 
static BSTR alloced_bstrs [256]
 
static int alloced_bstrs_count
 

Macro Definition Documentation

◆ check_interface

#define check_interface (   a,
  b,
  c 
)    check_interface_(__LINE__, a, b, c)

Definition at line 51 of file schema.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file schema.c.

Function Documentation

◆ _bstr_()

static BSTR _bstr_ ( const WCHAR str)
static

Definition at line 69 of file schema.c.

70{
74}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define assert(_expr)
Definition: assert.h:32
static BSTR alloced_bstrs[256]
Definition: schema.c:376
static int alloced_bstrs_count
Definition: schema.c:377
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
const WCHAR * str

◆ check_interface_()

static void check_interface_ ( unsigned int  line,
void iface_ptr,
REFIID  iid,
BOOL  supported 
)
static

Definition at line 52 of file schema.c.

53{
54 IUnknown *iface = iface_ptr;
55 HRESULT hr, expected_hr;
56 IUnknown *unk;
57
58 expected_hr = supported ? S_OK : E_NOINTERFACE;
59
60 hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
61 ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr);
62 if (SUCCEEDED(hr))
63 IUnknown_Release(unk);
64}
#define ok_(x1, x2)
Definition: atltest.h:61
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hr
Definition: shlfolder.c:183
Definition: parser.c:49
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ create_cache()

static void * create_cache ( REFIID  riid)
static

Definition at line 95 of file schema.c.

96{
97 void *obj = NULL;
98 HRESULT hr;
99
100 hr = CoCreateInstance(&CLSID_XMLSchemaCache60, NULL, CLSCTX_INPROC_SERVER, riid, &obj);
101 ok(hr == S_OK, "Failed to create a document object, hr %#lx.\n", hr);
102
103 return obj;
104}
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
REFIID riid
Definition: atlbase.h:39
GUID CLSID_XMLSchemaCache60

◆ create_document()

static IXMLDOMDocument2 * create_document ( void  )
static

Definition at line 84 of file schema.c.

85{
87 HRESULT hr;
88
89 hr = CoCreateInstance(&CLSID_DOMDocument60, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (void **)&obj);
90 ok(hr == S_OK, "Failed to create a document object, hr %#lx.\n", hr);
91
92 return obj;
93}

◆ DEFINE_GUID()

DEFINE_GUID ( GUID_NULL  ,
,
,
,
,
,
,
,
,
,
,
 
)

◆ free_bstrs()

static void free_bstrs ( void  )
static

Definition at line 76 of file schema.c.

77{
78 int i;
79 for (i = 0; i < alloced_bstrs_count; i++)
82}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271

◆ START_TEST()

START_TEST ( schema  )

Definition at line 422 of file schema.c.

423{
424 IUnknown *obj;
425 HRESULT hr;
426
428 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
429
430 hr = CoCreateInstance(&CLSID_DOMDocument60, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (void **)&obj);
431 if (FAILED(hr))
432 {
433 win_skip("DOMDocument60 is not supported.\n");
435 return;
436 }
437 IUnknown_Release(obj);
438
439 test_regex();
440 test_get();
441 test_ifaces();
442 test_remove();
443 test_dispex();
445
447}
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
#define FAILED(hr)
Definition: intsafe.h:51
#define win_skip
Definition: minitest.h:67
static void test_dispex(void)
Definition: schema.c:1498
static void test_regex(void)
Definition: schema.c:239
static void test_remove(void)
Definition: schema.c:315
static void test_get(void)
Definition: schema.c:297
static void test_validate_on_load(void)
Definition: schema.c:368
static void test_ifaces(void)
Definition: schema.c:266

◆ test_dispex()

static void test_dispex ( void  )
static

Definition at line 387 of file schema.c.

388{
390 IUnknown *unk;
391 HRESULT hr;
392
393 cache = create_cache(&IID_IXMLDOMSchemaCollection);
394
395 hr = IXMLDOMSchemaCollection_QueryInterface(cache, &IID_IUnknown, (void**)&unk);
396 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
397 test_obj_dispex(unk);
398 IUnknown_Release(unk);
399
400 IXMLDOMSchemaCollection_Release(cache);
401}
const GUID IID_IUnknown
#define create_cache(iid)
Definition: schema.c:420
static void test_obj_dispex(IUnknown *obj)
Definition: schema.c:1446
Definition: cache.c:49

◆ test_get()

static void test_get ( void  )
static

Definition at line 248 of file schema.c.

249{
252 HRESULT hr;
253
254 cache = create_cache(&IID_IXMLDOMSchemaCollection2);
255
256 hr = IXMLDOMSchemaCollection2_get(cache, NULL, NULL);
257 ok(hr == E_NOTIMPL || hr == E_POINTER /* win8 */, "Unexpected hr %#lx.\n", hr);
258
259 hr = IXMLDOMSchemaCollection2_get(cache, _bstr_(L"uri"), &node);
260 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
261
262 IXMLDOMSchemaCollection2_Release(cache);
263 free_bstrs();
264}
#define E_NOTIMPL
Definition: ddrawi.h:99
#define L(x)
Definition: resources.c:13
static void free_bstrs(void)
Definition: schema.c:386
static BSTR _bstr_(const WCHAR *str)
Definition: schema.c:379
Definition: dlist.c:348
#define E_POINTER
Definition: winerror.h:3480

◆ test_ifaces()

static void test_ifaces ( void  )
static

Definition at line 266 of file schema.c.

267{
269 IUnknown *unk;
270 HRESULT hr;
271
272 cache = create_cache(&IID_IXMLDOMSchemaCollection2);
273
274 /* CLSID_XMLSchemaCache60 is returned as an interface (the same as IXMLDOMSchemaCollection2). */
275 hr = IXMLDOMSchemaCollection2_QueryInterface(cache, &CLSID_XMLSchemaCache60, (void**)&unk);
276 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
277 ok(unk == (IUnknown *)cache, "Unexpected pointer %p.\n", unk);
278 IUnknown_Release(unk);
279
280 check_interface(cache, &IID_IXMLDOMSchemaCollection, TRUE);
281 check_interface(cache, &IID_IXMLDOMSchemaCollection2, TRUE);
283 check_interface(cache, &IID_IDispatchEx, TRUE);
284
285 IXMLDOMSchemaCollection2_Release(cache);
286}
#define TRUE
Definition: types.h:120
#define check_interface(a, b, c)
Definition: schema.c:51
const GUID IID_IDispatch

Referenced by START_TEST().

◆ test_obj_dispex()

static void test_obj_dispex ( IUnknown obj)
static

Definition at line 335 of file schema.c.

336{
338 IDispatchEx *dispex;
339 IUnknown *unk;
340 DWORD props;
341 UINT ticnt;
342 HRESULT hr;
343 BSTR name;
344
345 hr = IUnknown_QueryInterface(obj, &IID_IDispatchEx, (void**)&dispex);
346 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
347 if (FAILED(hr)) return;
348
349 ticnt = 0;
350 hr = IDispatchEx_GetTypeInfoCount(dispex, &ticnt);
351 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
352 ok(ticnt == 1, "ticnt=%u\n", ticnt);
353
354 name = SysAllocString(L"*");
355 hr = IDispatchEx_DeleteMemberByName(dispex, name, fdexNameCaseSensitive);
356 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
358
359 hr = IDispatchEx_DeleteMemberByDispID(dispex, dispid);
360 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
361
362 props = 0;
363 hr = IDispatchEx_GetMemberProperties(dispex, dispid, grfdexPropCanAll, &props);
364 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
365 ok(props == 0, "expected 0 got %ld\n", props);
366
367 hr = IDispatchEx_GetMemberName(dispex, dispid, &name);
368 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
370
371 hr = IDispatchEx_GetNextDispID(dispex, fdexEnumDefault, DISPID_XMLDOM_SCHEMACOLLECTION_ADD, &dispid);
372 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
373
374 unk = (IUnknown*)0xdeadbeef;
375 hr = IDispatchEx_GetNameSpaceParent(dispex, &unk);
376 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
377 ok(unk == (IUnknown*)0xdeadbeef, "got %p\n", unk);
378
379 name = SysAllocString(L"testprop");
380 hr = IDispatchEx_GetDispID(dispex, name, fdexNameEnsure, &dispid);
381 ok(hr == DISP_E_UNKNOWNNAME, "Unexpected hr %#lx.\n", hr);
383
384 IDispatchEx_Release(dispex);
385}
OLECHAR * BSTR
Definition: compat.h:2293
unsigned long DWORD
Definition: ntddk_ex.h:95
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define DISPID_XMLDOM_SCHEMACOLLECTION_ADD
Definition: msxml2did.h:292
#define DISPID_SAX_XMLREADER_GETFEATURE
Definition: msxml2did.h:342
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:39
static const WCHAR props[]
Definition: wbemdisp.c:288
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:3618

◆ test_regex()

static void test_regex ( void  )
static

Definition at line 190 of file schema.c.

191{
192 static const struct regex_test
193 {
194 const WCHAR *regex;
195 const WCHAR *input;
196 }
197 tests[] =
198 {
199 { L"\\!", L"!" },
200 { L"\\\"", L"\"" },
201 { L"\\#", L"#" },
202 { L"\\$", L"$" },
203 { L"\\%", L"%" },
204 { L"\\,", L"," },
205 { L"\\/", L"/" },
206 { L"\\:", L":" },
207 { L"\\;", L";" },
208 { L"\\=", L"=" },
209 { L"\\>", L">" },
210 { L"\\@", L"@" },
211 { L"\\`", L"`" },
212 { L"\\~", L"~" },
213 { L"\\uCAFE", L"\xCAFE" },
214 /* non-BMP character in surrogate pairs: */
215 { L"\\uD83D\\uDE00", L"\xD83D\xDE00" },
216 /* "x{,2}" is non-standard and only works on libxml2 <= v2.9.10 */
217 { L"x{0,2}", L"x" }
218 };
219 unsigned int i;
220
221 for (i = 0; i < ARRAY_SIZE(tests); ++i)
222 {
223 const struct regex_test *test = &tests[i];
226 HRESULT hr;
227
228 winetest_push_context("Test %s", wine_dbgstr_w(test->regex));
229
230 doc = create_document();
232 cache = create_cache(&IID_IXMLDOMSchemaCollection);
233
234 hr = validate_regex_document(doc, schema, cache, tests->regex, tests->input);
235 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
236
237 if (doc)
238 IXMLDOMDocument2_Release(doc);
239 if (schema)
240 IXMLDOMDocument2_Release(schema);
241 if (cache)
242 IXMLDOMSchemaCollection_Release(cache);
243
245 }
246}
GLenum GLenum GLenum input
Definition: glext.h:9031
#define wine_dbgstr_w
Definition: kernel32.h:34
const WCHAR * schema
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
static struct test_info tests[]
#define create_document(iid)
Definition: schema.c:416
static HRESULT validate_regex_document(IXMLDOMDocument2 *doc, IXMLDOMDocument2 *schema, IXMLDOMSchemaCollection *cache, const WCHAR *regex, const WCHAR *input)
Definition: schema.c:155
#define test
Definition: rosglue.h:37
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ test_remove()

static void test_remove ( void  )
static

Definition at line 288 of file schema.c.

289{
291 IXMLDOMDocument2 *doc;
293 HRESULT hr;
294 VARIANT v;
295 LONG len;
296
297 cache = create_cache(&IID_IXMLDOMSchemaCollection2);
298
299 doc = create_document();
300 ok(doc != NULL, "got %p\n", doc);
301
302 hr = IXMLDOMDocument2_loadXML(doc, _bstr_(xsd_schema1_xml), &b);
303 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
304
305 V_VT(&v) = VT_DISPATCH;
306 V_DISPATCH(&v) = (IDispatch*)doc;
307 hr = IXMLDOMSchemaCollection2_add(cache, _bstr_(xsd_schema1_uri), v);
308 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
309
310 len = -1;
311 hr = IXMLDOMSchemaCollection2_get_length(cache, &len);
312 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
313 ok(len == 1, "Unexpected length %ld.\n", len);
314
315 /* ::remove() is a stub for version 6 */
316 hr = IXMLDOMSchemaCollection2_remove(cache, NULL);
317 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
318
319 hr = IXMLDOMSchemaCollection2_remove(cache, _bstr_(L"invaliduri"));
320 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
321
322 hr = IXMLDOMSchemaCollection2_remove(cache, _bstr_(xsd_schema1_uri));
323 ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
324
325 len = -1;
326 hr = IXMLDOMSchemaCollection2_get_length(cache, &len);
327 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
328 ok(len == 1, "Unexpected length %ld.\n", len);
329
330 IXMLDOMDocument2_Release(doc);
331 IXMLDOMSchemaCollection2_Release(cache);
332 free_bstrs();
333}
short VARIANT_BOOL
Definition: compat.h:2290
@ VT_DISPATCH
Definition: compat.h:2304
const GLdouble * v
Definition: gl.h:2040
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLenum GLsizei len
Definition: glext.h:6722
#define b
Definition: ke_i.h:79
static const WCHAR xsd_schema1_uri[]
Definition: schema.c:87
static const WCHAR xsd_schema1_xml[]
Definition: schema.c:32
#define V_VT(A)
Definition: oleauto.h:211
#define V_DISPATCH(A)
Definition: oleauto.h:239
long LONG
Definition: pedump.c:60

◆ test_validate_on_load()

static void test_validate_on_load ( void  )
static

Definition at line 403 of file schema.c.

404{
407 HRESULT hr;
408
409 cache = create_cache(&IID_IXMLDOMSchemaCollection2);
410
411 hr = IXMLDOMSchemaCollection2_get_validateOnLoad(cache, NULL);
412 ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
413
414 b = VARIANT_FALSE;
415 hr = IXMLDOMSchemaCollection2_get_validateOnLoad(cache, &b);
416 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
417 ok(b == VARIANT_TRUE, "got %d\n", b);
418
419 IXMLDOMSchemaCollection2_Release(cache);
420}

◆ validate_regex_document()

static HRESULT validate_regex_document ( IXMLDOMDocument2 doc,
IXMLDOMDocument2 schema,
IXMLDOMSchemaCollection cache,
const WCHAR regex,
const WCHAR input 
)
static

Definition at line 106 of file schema.c.

108{
109 static const WCHAR regex_doc[] =
110L""
111"<?xml version='1.0'?>"
112"<root xmlns='urn:test'>%s</root>";
113
114 static const WCHAR regex_schema[] =
115L"<?xml version='1.0'?>"
116"<schema xmlns='http://www.w3.org/2001/XMLSchema'"
117" targetNamespace='urn:test'>"
118" <element name='root'>"
119" <simpleType>"
120" <restriction base='string'>"
121" <pattern value='%s'/>"
122" </restriction>"
123" </simpleType>"
124" </element>"
125"</schema>";
126
127 WCHAR buffer[1024];
129 BSTR namespace, bstr;
131 HRESULT hr;
132 VARIANT v;
133
134 VariantInit(&v);
135
136 swprintf(buffer, ARRAY_SIZE(buffer), regex_doc, input);
137 bstr = SysAllocString(buffer);
138 hr = IXMLDOMDocument2_loadXML(doc, bstr, &b);
139 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
140 ok(b == VARIANT_TRUE, "failed to load XML\n");
141 SysFreeString(bstr);
142
143 swprintf(buffer, ARRAY_SIZE(buffer), regex_schema, regex);
144 bstr = SysAllocString(buffer);
145 hr = IXMLDOMDocument2_loadXML(schema, bstr, &b);
146 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
147 ok(b == VARIANT_TRUE, "failed to load XML\n");
148 SysFreeString(bstr);
149
150 /* add the schema to the cache */
151 V_VT(&v) = VT_DISPATCH;
152 V_DISPATCH(&v) = NULL;
153 hr = IXMLDOMDocument2_QueryInterface(schema, &IID_IDispatch, (void**)&V_DISPATCH(&v));
154 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
155 ok(V_DISPATCH(&v) != NULL, "failed to get IDispatch interface\n");
156 namespace = SysAllocString(L"urn:test");
157 hr = IXMLDOMSchemaCollection_add(cache, namespace, v);
158 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
159 SysFreeString(namespace);
160 VariantClear(&v);
161/*
162 if (FAILED(hr))
163 return hr;
164*/
165 /* associate the cache to the doc */
166 V_VT(&v) = VT_DISPATCH;
167 V_DISPATCH(&v) = NULL;
168 hr = IXMLDOMSchemaCollection_QueryInterface(cache, &IID_IDispatch, (void**)&V_DISPATCH(&v));
169 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
170 ok(V_DISPATCH(&v) != NULL, "failed to get IDispatch interface\n");
171 hr = IXMLDOMDocument2_putref_schemas(doc, v);
172 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
173 VariantClear(&v);
174
175 /* validate the doc
176 * only declared elements in the declared order
177 * this is fine */
178 err = NULL;
179 bstr = NULL;
180 hr = IXMLDOMDocument2_validate(doc, &err);
181 ok(err != NULL, "domdoc_validate() should always set err\n");
182 if (IXMLDOMParseError_get_reason(err, &bstr) != S_FALSE)
183 trace("got error: %s\n", wine_dbgstr_w(bstr));
184 SysFreeString(bstr);
185 IXMLDOMParseError_Release(err);
186
187 return hr;
188}
#define trace
Definition: atltest.h:70
#define swprintf
Definition: precomp.h:40
GLuint buffer
Definition: glext.h:5915
#define err(...)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
#define S_FALSE
Definition: winerror.h:3451

Variable Documentation

◆ alloced_bstrs

BSTR alloced_bstrs[256]
static

Definition at line 66 of file schema.c.

◆ alloced_bstrs_count

int alloced_bstrs_count
static

Definition at line 67 of file schema.c.

◆ xsd_schema1_uri

const WCHAR xsd_schema1_uri[] = L"x-schema:test1.xsd"
static

Definition at line 37 of file schema.c.

◆ xsd_schema1_xml

const WCHAR xsd_schema1_xml[]
static
Initial value:
=
L"<?xml version='1.0'?>"
"<schema xmlns='http://www.w3.org/2001/XMLSchema'"
" targetNamespace='x-schema:test1.xsd'>"
" <element name='root'>"
" <complexType>"
" <sequence maxOccurs='unbounded'>"
" <any/>"
" </sequence>"
" </complexType>"
" </element>"
"</schema>"

Definition at line 38 of file schema.c.