41#define EXPECT_HR(hr,hr_exp) \
42 ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
44#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
49 rc = IUnknown_Release(
obj);
50 ok_(__FILE__,
line)(rc ==
ref,
"expected refcount %d, got %d\n",
ref, rc);
58 ref = IUnknown_AddRef(unk);
59 IUnknown_Release(unk);
145 if (lenexp !=
len)
return;
185 "putDocumentLocator",
188 "startPrefixMapping",
193 "ignorableWhitespace",
194 "processingInstruction",
242#define CONTENT_HANDLER_INDEX 0
243#define NUM_CALL_SEQUENCES 1
248 memset(call, 0,
sizeof(*call));
291 for (
i = 0;
i < call_seq->
count;
i++)
329 while (
ptr->uri) { lenexp++;
ptr++; };
365 add_call(seq, sequence_index, &end_of_sequence);
383 "%s: in event %s expecting line %d got %d\n",
390 "%s: in event %s expecting line %d got %d\n",
404 "%s: in event %s expecting column %d got %d\n",
411 "%s: in event %s expecting column %d got %d\n",
463 "%s: in event %s expecting ret 0x%08x got 0x%08x\n",
468 "%s: in event %s expecting ret 0x%08x got 0x%08x\n",
484 ok_(
file,
line) (
FALSE,
"%s: call %s was expected, but got call %s instead\n",
493 ok_(
file,
line) (
FALSE,
"%s: call %s was expected, but got call %s instead\n",
507 ok_(
file,
line) (
FALSE,
"%s: the call sequence is not complete: expected %s - actual %s\n",
514 ok_(
file,
line) (
FALSE,
"%s: the call sequence is not complete: expected %s - actual %s\n",
518 if (
todo && !failcount)
529#define ok_sequence(seq, index, exp, contx, todo) \
530 ok_sequence_(seq, index, (exp), (contx), (todo), __FILE__, __LINE__)
536 for (
i = 0;
i <
n;
i++)
541'<',
'?',
'x',
'm',
'l',
' ',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'=',
'\"',
'1',
'.',
'0',
'\"',
' ',
'?',
'>',
'\n',
542'<',
'B',
'a',
'n',
'k',
'A',
'c',
'c',
'o',
'u',
'n',
't',
'>',
'\n',
543' ',
' ',
' ',
'<',
'N',
'u',
'm',
'b',
'e',
'r',
'>',
'1',
'2',
'3',
'4',
'<',
'/',
'N',
'u',
'm',
'b',
'e',
'r',
'>',
'\n',
544' ',
' ',
' ',
'<',
'N',
'a',
'm',
'e',
'>',
'C',
'a',
'p',
't',
'a',
'i',
'n',
' ',
'A',
'h',
'a',
'b',
'<',
'/',
'N',
'a',
'm',
'e',
'>',
'\n',
545'<',
'/',
'B',
'a',
'n',
'k',
'A',
'c',
'c',
'o',
'u',
'n',
't',
'>',
'\n',
'\0'
549'<',
'?',
'x',
'm',
'l',
' ',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'=',
'"',
'1',
'.',
'0',
'"',
'?',
'>',
'\r',
'\n',
550'<',
'B',
'a',
'n',
'k',
'A',
'c',
'c',
'o',
'u',
'n',
't',
'>',
'\r',
'\n',
551'\t',
'<',
'N',
'u',
'm',
'b',
'e',
'r',
'>',
'1',
'2',
'3',
'4',
'<',
'/',
'N',
'u',
'm',
'b',
'e',
'r',
'>',
'\r',
'\n',
552'\t',
'<',
'N',
'a',
'm',
'e',
'>',
'C',
'a',
'p',
't',
'a',
'i',
'n',
' ',
'A',
'h',
'a',
'b',
'<',
'/',
'N',
'a',
'm',
'e',
'>',
'\r',
'\n',
553'<',
'/',
'B',
'a',
'n',
'k',
'A',
'c',
'c',
'o',
'u',
'n',
't',
'>',
'\r',
'\n',
'\0'
557'<',
'?',
'x',
'm',
'l',
' ',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'=',
'"',
'1',
'.',
'0',
'"',
' ',
558'e',
'n',
'c',
'o',
'd',
'i',
'n',
'g',
'=',
'"',
'U',
'T',
'F',
'-',
'1',
'6',
'"',
' ',
559's',
't',
'a',
'n',
'd',
'a',
'l',
'o',
'n',
'e',
'=',
'"',
'n',
'o',
'"',
'?',
'>',
'\r',
'\n'
565"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n";
568"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\r\n";
571"<?xml version=\"1.0\" ?>\n"
573" <Number>1234</Number>\n"
574" <Name>Captain Ahab</Name>\n"
578"<?xml version=\"1.0\" ?>\n"
579"<document xmlns:test=\"prefix_test\" xmlns=\"prefix\" test:arg1=\"arg1\" arg2=\"arg2\" test:ar3=\"arg3\">\n"
580"<node1 xmlns:p=\"test\" />"
584"<?xml version=\"1.0\" ?>"
585"<a><![CDATA[Some \r\ntext\n\r\ndata\n\n]]></a>";
588"<?xml version=\"1.0\" ?>"
589"<a><![CDATA[\n\r\nSome \r\ntext\n\r\ndata\n\n]]></a>";
592"<?xml version=\"1.0\" ?><a><![CDATA[Some text data]]></a>";
709 {
"",
"",
"xmlns:test",
"prefix_test" },
710 {
"",
"",
"xmlns",
"prefix" },
711 {
"prefix_test",
"arg1",
"test:arg1",
"arg1" },
712 {
"",
"arg2",
"arg2",
"arg2" },
713 {
"prefix_test",
"ar3",
"test:ar3",
"arg3" },
718 {
"",
"",
"xmlns:p",
"test" },
741 {
"prefix_test",
"arg1",
"test:arg1",
"arg1" },
742 {
"",
"arg2",
"arg2",
"arg2" },
743 {
"prefix_test",
"ar3",
"test:ar3",
"arg3" },
744 {
"",
"",
"xmlns:test",
"prefix_test" },
745 {
"",
"",
"xmlns",
"prefix" },
769 {
"",
"",
"xmlns:test",
"prefix_test" },
770 {
"",
"",
"xmlns",
"prefix" },
771 {
"",
"",
"test:arg1",
"arg1" },
772 {
"",
"",
"arg2",
"arg2" },
773 {
"",
"",
"test:ar3",
"arg3" },
790 {
"prefix_test",
"arg1",
"test:arg1",
"arg1" },
791 {
"",
"arg2",
"arg2",
"arg2" },
792 {
"prefix_test",
"ar3",
"test:ar3",
"arg3" },
793 {
"http://www.w3.org/2000/xmlns/",
"",
"xmlns:test",
"prefix_test" },
794 {
"http://www.w3.org/2000/xmlns/",
"",
"xmlns",
"prefix" },
799 {
"http://www.w3.org/2000/xmlns/",
"",
"xmlns:p",
"test" },
823 {
"prefix_test",
"arg1",
"test:arg1",
"arg1" },
824 {
"",
"arg2",
"arg2",
"arg2" },
825 {
"prefix_test",
"ar3",
"test:ar3",
"arg3" },
866 {
"http://www.w3.org/XML/1998/namespace",
"space",
"xml:space",
"preserve" },
892 "<?xml version=\"1.0\" ?>\n"
893 "<a attr1=\" \r \n \tattr_value A & &\t \r \n\r\n \n\"/>\n";
896 {
"",
"attr1",
"attr1",
" attr_value A & & " },
1007 {
"",
"attr",
"attr",
"val" },
1033 "<?xml version=\"1.0\" encoding=\"UTF-16\"?>"
1034 "<a xml:space=\"preserve\"> Some text data </a>";
1055 ISAXContentHandler* iface,
1074 ISAXContentHandler* iface)
1080 ISAXContentHandler* iface)
1086 ISAXContentHandler* iface,
1087 ISAXLocator *pLocator)
1099 hr = ISAXLocator_QueryInterface(pLocator, &IID_IVBSAXLocator, (
void**)&unk);
1103 ISAXAttributes *
attr, *attr1;
1104 IMXAttributes *mxattr;
1107 hr = ISAXLocator_QueryInterface(pLocator, &IID_ISAXAttributes, (
void**)&
attr);
1110 hr = ISAXLocator_QueryInterface(pLocator, &IID_ISAXAttributes, (
void**)&attr1);
1113 ok(
attr == attr1,
"got %p, %p\n",
attr, attr1);
1115 hr = ISAXAttributes_QueryInterface(
attr, &IID_IVBSAXAttributes, (
void**)&unk);
1118 hr = ISAXLocator_QueryInterface(pLocator, &IID_IVBSAXAttributes, (
void**)&unk);
1121 hr = ISAXAttributes_QueryInterface(
attr, &IID_IMXAttributes, (
void**)&mxattr);
1124 ISAXAttributes_Release(
attr);
1125 ISAXAttributes_Release(attr1);
1133 ISAXContentHandler* iface)
1147 ISAXContentHandler* iface)
1159 ISAXContentHandler* iface,
1178 ISAXContentHandler* iface,
1194 ISAXContentHandler* iface,
1196 const WCHAR *localname,
int local_len,
1197 const WCHAR *qname,
int qname_len,
1198 ISAXAttributes *saxattr)
1201 IMXAttributes *mxattr;
1206 ok(localname !=
NULL,
"localname == NULL\n");
1207 ok(qname !=
NULL,
"qname == NULL\n");
1209 hr = ISAXAttributes_QueryInterface(saxattr, &IID_IMXAttributes, (
void**)&mxattr);
1224 hr = ISAXAttributes_getLength(saxattr, &
len);
1236 hr = ISAXXMLReader_getFeature(
g_reader,
_bstr_(
"http://xml.org/sax/features/namespaces"), &
v);
1239 for (
i = 0;
i <
len;
i++)
1244 hr = ISAXAttributes_getName(saxattr,
i, &
uri, &uri_len,
1245 &localname, &local_len, &
qname, &qname_len);
1248 hr = ISAXAttributes_getValue(saxattr,
i, &
value, &value_len);
1277 ISAXContentHandler* iface,
1279 const WCHAR *localname,
int local_len,
1285 ok(localname !=
NULL,
"localname == NULL\n");
1286 ok(qname !=
NULL,
"qname == NULL\n");
1299 ISAXContentHandler* iface,
1305 ok(chars !=
NULL,
"chars == NULL\n");
1316 ISAXContentHandler* iface,
1321 ok(chars !=
NULL,
"chars == NULL\n");
1332 ISAXContentHandler* iface,
1351 ISAXContentHandler* iface,
1387 ISAXErrorHandler* iface,
1406 ISAXErrorHandler* iface)
1412 ISAXErrorHandler* iface)
1418 ISAXErrorHandler* iface,
1419 ISAXLocator *pLocator,
1420 const WCHAR *pErrorMessage,
1423 ok(0,
"unexpected call\n");
1428 ISAXErrorHandler* iface,
1429 ISAXLocator *pLocator,
1446 ISAXErrorHandler* iface,
1447 ISAXLocator *pLocator,
1448 const WCHAR *pErrorMessage,
1451 ok(0,
"unexpected call\n");
1468 ISAXAttributes* iface,
1503 ISAXAttributes* iface,
1508 ok(0,
"unexpected call\n");
1513 ISAXAttributes* iface,
1515 const WCHAR **pLocalName,
1516 int *pLocalNameLength)
1518 ok(0,
"unexpected call\n");
1523 ISAXAttributes* iface,
1525 const WCHAR **QName,
1528 static const WCHAR attrqnamesW[][15] = {{
'a',
':',
'a',
't',
't',
'r',
'1',
'j',
'u',
'n',
'k',0},
1529 {
'a',
't',
't',
'r',
'2',
'j',
'u',
'n',
'k',0},
1530 {
'a',
't',
't',
'r',
'3',0}};
1531 static const int attrqnamelen[] = {7, 5, 5};
1536 *QName = attrqnamesW[
index];
1537 *QNameLength = attrqnamelen[
index];
1547 ISAXAttributes* iface,
1551 const WCHAR ** pLocalName,
1552 int * pLocalNameSize,
1553 const WCHAR ** pQName,
1556 ok(0,
"unexpected call\n");
1561 ISAXAttributes* iface,
1564 const WCHAR * pLocalName,
1565 int cocalNameLength,
1568 ok(0,
"unexpected call\n");
1573 ISAXAttributes* iface,
1574 const WCHAR * pQName,
1578 ok(0,
"unexpected call\n");
1583 ISAXAttributes* iface,
1585 const WCHAR ** pType,
1588 ok(0,
"unexpected call\n");
1593 ISAXAttributes* iface,
1596 const WCHAR * pLocalName,
1598 const WCHAR ** pType,
1601 ok(0,
"unexpected call\n");
1606 ISAXAttributes* iface,
1607 const WCHAR * pQName,
1609 const WCHAR ** pType,
1612 ok(0,
"unexpected call\n");
1619 static const WCHAR attrvaluesW[][10] = {{
'a',
'1',
'j',
'u',
'n',
'k',0},
1620 {
'a',
'2',
'j',
'u',
'n',
'k',0},
1621 {
'<',
'&',
'"',
'>',
'\'',0}};
1622 static const int attrvalueslen[] = {2, 2, 5};
1628 *nValue = attrvalueslen[
index];
1638 ISAXAttributes* iface,
1641 const WCHAR * pLocalName,
1646 ok(0,
"unexpected call\n");
1651 ISAXAttributes* iface,
1652 const WCHAR * pQName,
1657 ok(0,
"unexpected call\n");
1705 ok(0,
"got unexpected IID_IUnknown query\n");
1714 ISAXLexicalHandler_AddRef(iface);
1735 int nPublicId,
const WCHAR * pSystemId,
int nSystemId)
1737 ok(0,
"call not expected\n");
1743 ok(0,
"call not expected\n");
1750 ok(0,
"call not expected\n");
1757 ok(0,
"call not expected\n");
1784 const WCHAR * pChars,
int nChars)
1786 ok(0,
"call not expected\n");
1833 ok(0,
"got unexpected IID_IUnknown query\n");
1842 ISAXDeclHandler_AddRef(iface);
1864 ok(0,
"call not expected\n");
1869 const WCHAR * pElementName,
int nElementName,
const WCHAR * pAttributeName,
1870 int nAttributeName,
const WCHAR * pType,
int nType,
const WCHAR * pValueDefault,
1871 int nValueDefault,
const WCHAR *
pValue,
int nValue)
1873 ok(0,
"call not expected\n");
1880 ok(0,
"call not expected\n");
1885 const WCHAR *
pName,
int nName,
const WCHAR * pPublicId,
int nPublicId,
1886 const WCHAR * pSystemId,
int nSystemId)
1888 ok(0,
"call not expected\n");
1953 ok(0,
"unexpected call\n");
1959 ok(0,
"unexpected call\n");
1966 ok(0,
"unexpected call\n");
1972 ok(0,
"unexpected call\n");
1979 ok(0,
"unexpected call\n");
1985 ok(0,
"unexpected call\n");
1991 ok(0,
"unexpected call\n");
1998 ok(0,
"unexpected call\n");
2005 ok(0,
"unexpected call\n");
2016 ok(0,
"unexpected call\n");
2024 ok(pv !=
NULL,
"pv == NULL\n");
2072 static const char *ret_str;
2075 ret_str =
"<?xml version=\"1.0\" ?>\n<rootelem>";
2077 ret_str =
"<elem attr=\"val\">text</elem>";
2079 ret_str =
"</rootelem>\n";
2085 *pcbRead =
strlen(ret_str);
2110 { &CLSID_SAXXMLReader,
"SAXReader" },
2111 { &CLSID_SAXXMLReader30,
"SAXReader30" },
2112 { &CLSID_SAXXMLReader40,
"SAXReader40" },
2113 { &CLSID_SAXXMLReader60,
"SAXReader60" },
2145 ISAXErrorHandler *lpErrorHandler;
2152 static const CHAR testXmlA[] =
"test.xml";
2153 static const WCHAR testXmlW[] = {
't',
'e',
's',
't',
'.',
'x',
'm',
'l',0};
2158 while (
table->clsid)
2161 ISAXEntityResolver *resolver;
2196 hr = ISAXXMLReader_getErrorHandler(
reader, &lpErrorHandler);
2198 ok(lpErrorHandler ==
NULL,
"Expected %p, got %p\n",
NULL, lpErrorHandler);
2327 hr = ISAXXMLReader_parseURL(
reader, testXmlW);
2338 hr = ISAXXMLReader_parseURL(
reader, testXmlW);
2348 hr = ISAXXMLReader_parseURL(
reader, testXmlW);
2355 hr = ISAXXMLReader_parseURL(
reader, testXmlW);
2364 &IID_IXMLDOMDocument, (
void**)&doc);
2368 hr = IXMLDOMDocument_loadXML(doc,
str, &
v);
2385 IXMLDOMDocument_Release(doc);
2411 hr = ISAXXMLReader_putFeature(
reader,
_bstr_(
"http://xml.org/sax/features/namespaces"), VARIANT_FALSE);
2431 hr = ISAXXMLReader_putFeature(
reader,
_bstr_(
"http://xml.org/sax/features/namespaces"), VARIANT_TRUE);
2435 hr = ISAXXMLReader_putFeature(
reader,
_bstr_(
"http://xml.org/sax/features/namespace-prefixes"), VARIANT_FALSE);
2456 hr = ISAXXMLReader_putFeature(
reader,
_bstr_(
"http://xml.org/sax/features/namespace-prefixes"), VARIANT_TRUE);
2478 resolver = (
void*)0xdeadbeef;
2479 hr = ISAXXMLReader_getEntityResolver(
reader, &resolver);
2481 ok(resolver ==
NULL,
"got %p\n", resolver);
2491 hr = ISAXXMLReader_putProperty(
reader,
_bstr_(
"http://xml.org/sax/properties/lexical-handler"),
var);
2550 ISAXXMLReader_Release(
reader);
2564 {
"http://xml.org/sax/properties/lexical-handler", (
IUnknown*)&
lexicalhandler.ISAXLexicalHandler_iface },
2565 {
"http://xml.org/sax/properties/declaration-handler", (
IUnknown*)&
declhandler.ISAXDeclHandler_iface },
2578 &IID_ISAXXMLReader, (
void**)&
reader);
2581 hr = ISAXXMLReader_getProperty(
reader,
_bstr_(
"http://xml.org/sax/properties/lexical-handler"),
NULL);
2584 while (
ptr->prop_name)
2719 ISAXXMLReader_Release(
reader);
2725 &IID_ISAXXMLReader, (
void**)&
reader);
2730 V_BSTR(&
v) = (
void*)0xdeadbeef;
2731 hr = ISAXXMLReader_getProperty(
reader,
_bstr_(
"xmldecl-version"), &
v);
2743 V_BSTR(&
v) = (
void*)0xdeadbeef;
2744 hr = ISAXXMLReader_getProperty(
reader,
_bstr_(
"xmldecl-version"), &
v);
2751 V_BSTR(&
v) =
_bstr_(
"<?xml version=\"1.0\"?><element></element>");
2756 str =
_bstr_(
"<?xml version=\"1.0\"?><element></element>");
2763 V_BSTR(&
v) = (
void*)0xdeadbeef;
2764 hr = ISAXXMLReader_getProperty(
reader,
_bstr_(
"xmldecl-version"), &
v);
2770 ISAXXMLReader_Release(
reader);
2782 { &CLSID_SAXXMLReader,
"CLSID_SAXXMLReader", VARIANT_TRUE, VARIANT_FALSE },
2783 { &CLSID_SAXXMLReader30,
"CLSID_SAXXMLReader30", VARIANT_TRUE, VARIANT_FALSE },
2784 { &CLSID_SAXXMLReader40,
"CLSID_SAXXMLReader40", VARIANT_TRUE, VARIANT_TRUE },
2785 { &CLSID_SAXXMLReader60,
"CLSID_SAXXMLReader60", VARIANT_TRUE, VARIANT_TRUE },
2790 "http://xml.org/sax/features/namespaces",
2791 "http://xml.org/sax/features/namespace-prefixes",
2817 value = VARIANT_TRUE;
2819 ok(
hr ==
S_OK,
"Failed to get feature value, hr %#x.\n",
hr);
2820 ok(
value == VARIANT_FALSE,
"Unexpected default feature value.\n");
2821 hr = ISAXXMLReader_putFeature(
reader,
_bstr_(
"exhaustive-errors"), VARIANT_FALSE);
2822 ok(
hr ==
S_OK,
"Failed to put feature value, hr %#x.\n",
hr);
2824 value = VARIANT_TRUE;
2826 ok(
hr ==
S_OK,
"Failed to get feature value, hr %#x.\n",
hr);
2827 ok(
value == VARIANT_FALSE,
"Unexpected default feature value.\n");
2828 hr = ISAXXMLReader_putFeature(
reader,
_bstr_(
"exhaustive-errors"), VARIANT_FALSE);
2829 ok(
hr ==
S_OK,
"Failed to put feature value, hr %#x.\n",
hr);
2866 ok(
value == VARIANT_FALSE,
"%s: got wrong value %x, expected VARIANT_FALSE\n",
entry->clsid,
value);
2873 ok(
value == VARIANT_TRUE,
"%s: got wrong value %x, expected VARIANT_TRUE\n",
entry->clsid,
value);
2878 ISAXXMLReader_Release(
reader);
2886"\xEF\xBB\xBF<?xml version = \"1.0\" encoding = \"UTF-16\"?>\n"
2898 { &CLSID_SAXXMLReader,
"CLSID_SAXXMLReader",
UTF8BOMTest, 0xc00ce56f,
TRUE },
2899 { &CLSID_SAXXMLReader30,
"CLSID_SAXXMLReader30",
UTF8BOMTest, 0xc00ce56f,
TRUE },
2908 static const WCHAR testXmlW[] = {
't',
'e',
's',
't',
'.',
'x',
'm',
'l',0};
2909 static const CHAR testXmlA[] =
"test.xml";
2932 hr = ISAXXMLReader_parseURL(
reader, testXmlW);
2944 ISAXXMLReader_Release(
reader);
2959 &IID_ISAXContentHandler,
2960 &IID_ISAXLexicalHandler,
2961 &IID_ISAXDeclHandler,
2962 &IID_ISAXDTDHandler,
2963 &IID_ISAXErrorHandler,
2964 &IID_IVBSAXDeclHandler,
2965 &IID_IVBSAXLexicalHandler,
2966 &IID_IVBSAXContentHandler,
2967 &IID_IVBSAXDTDHandler,
2968 &IID_IVBSAXErrorHandler
2972 &IID_IMXWriter, (
void**)&writer);
2973 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
2983 hr = IMXWriter_QueryInterface(writer, riids[
i], (
void**)&
handler);
2989 hr = IUnknown_QueryInterface(
handler, &IID_IMXWriter, (
void**)&writer2);
2991 ok(writer2 == writer,
"got %p, expected %p\n", writer2, writer);
2993 IMXWriter_Release(writer2);
2997 IMXWriter_Release(writer);
3002 { &CLSID_MXXMLWriter,
"MXXMLWriter" },
3003 { &CLSID_MXXMLWriter30,
"MXXMLWriter30" },
3004 { &CLSID_MXXMLWriter40,
"MXXMLWriter40" },
3005 { &CLSID_MXXMLWriter60,
"MXXMLWriter60" },
3011 { &CLSID_SAXAttributes,
"SAXAttributes" },
3012 { &CLSID_SAXAttributes30,
"SAXAttributes30" },
3013 { &CLSID_SAXAttributes40,
"SAXAttributes40" },
3014 { &CLSID_SAXAttributes60,
"SAXAttributes60" },
3031 { &CLSID_MXXMLWriter, VARIANT_TRUE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE,
"UTF-16" },
3032 { &CLSID_MXXMLWriter30, VARIANT_TRUE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE,
"UTF-16" },
3033 { &CLSID_MXXMLWriter40, VARIANT_TRUE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE,
"UTF-16" },
3034 { &CLSID_MXXMLWriter60, VARIANT_TRUE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE,
"UTF-16" },
3042 while (
table->clsid)
3057 &IID_IMXWriter, (
void**)&writer);
3061 hr = IMXWriter_get_byteOrderMark(writer, &
b);
3063 ok(
table->bom ==
b,
"test %d: got BOM %d, expected %d\n",
i,
b,
table->bom);
3065 b = !
table->disable_escape;
3066 hr = IMXWriter_get_disableOutputEscaping(writer, &
b);
3068 ok(
table->disable_escape ==
b,
"test %d: got disable escape %d, expected %d\n",
i,
b,
3069 table->disable_escape);
3072 hr = IMXWriter_get_indent(writer, &
b);
3074 ok(
table->indent ==
b,
"test %d: got indent %d, expected %d\n",
i,
b,
table->indent);
3077 hr = IMXWriter_get_omitXMLDeclaration(writer, &
b);
3079 ok(
table->omitdecl ==
b,
"test %d: got omitdecl %d, expected %d\n",
i,
b,
table->omitdecl);
3082 hr = IMXWriter_get_standalone(writer, &
b);
3084 ok(
table->standalone ==
b,
"test %d: got standalone %d, expected %d\n",
i,
b,
table->standalone);
3086 hr = IMXWriter_get_encoding(writer, &
encoding);
3092 IMXWriter_Release(writer);
3101 static const WCHAR utf16W[] = {
'U',
'T',
'F',
'-',
'1',
'6',0};
3102 static const WCHAR testW[] = {
't',
'e',
's',
't',0};
3113 &IID_IMXWriter, (
void**)&writer);
3114 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3116 hr = IMXWriter_get_disableOutputEscaping(writer,
NULL);
3119 hr = IMXWriter_get_byteOrderMark(writer,
NULL);
3122 hr = IMXWriter_get_indent(writer,
NULL);
3125 hr = IMXWriter_get_omitXMLDeclaration(writer,
NULL);
3128 hr = IMXWriter_get_standalone(writer,
NULL);
3132 hr = IMXWriter_put_standalone(writer, VARIANT_TRUE);
3136 hr = IMXWriter_get_standalone(writer, &
b);
3138 ok(
b == VARIANT_TRUE,
"got %d\n",
b);
3140 hr = IMXWriter_get_encoding(writer,
NULL);
3144 str = (
void*)0xdeadbeef;
3145 hr = IMXWriter_get_encoding(writer, &
str);
3149 str2 = (
void*)0xdeadbeef;
3150 hr = IMXWriter_get_encoding(writer, &str2);
3152 ok(
str != str2,
"expected newly allocated, got same %p\n",
str);
3159 hr = IMXWriter_put_encoding(writer,
str);
3163 str = (
void*)0xdeadbeef;
3164 hr = IMXWriter_get_encoding(writer, &
str);
3171 hr = IMXWriter_put_encoding(writer,
str);
3176 hr = IMXWriter_put_encoding(writer,
_bstr_(
"utf-8"));
3178 str = (
void*)0xdeadbeef;
3179 hr = IMXWriter_get_encoding(writer, &
str);
3184 hr = IMXWriter_put_encoding(writer,
_bstr_(
"uTf-16"));
3186 str = (
void*)0xdeadbeef;
3187 hr = IMXWriter_get_encoding(writer, &
str);
3193 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
3196 hr = ISAXContentHandler_startDocument(
content);
3198 hr = ISAXContentHandler_endDocument(
content);
3202 hr = IMXWriter_get_output(writer, &
dest);
3205 ok(!
lstrcmpW(
_bstr_(
"<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"yes\"?>\r\n"),
3208 ISAXContentHandler_Release(
content);
3210 hr = IMXWriter_get_version(writer,
NULL);
3213 hr = IMXWriter_get_version(writer, &
str);
3219 hr = IMXWriter_put_version(writer,
NULL);
3222 hr = IMXWriter_put_version(writer,
_bstr_(
"1.0"));
3225 hr = IMXWriter_put_version(writer,
_bstr_(
""));
3227 hr = IMXWriter_get_version(writer, &
str);
3232 hr = IMXWriter_put_version(writer,
_bstr_(
"a.b"));
3234 hr = IMXWriter_get_version(writer, &
str);
3239 hr = IMXWriter_put_version(writer,
_bstr_(
"2.0"));
3241 hr = IMXWriter_get_version(writer, &
str);
3246 IMXWriter_Release(writer);
3264 &IID_IMXWriter, (
void**)&writer);
3265 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3268 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3273 hr = IMXWriter_put_output(writer,
dest);
3274 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3279 hr = IMXWriter_put_output(writer,
dest);
3280 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3285 hr = IMXWriter_put_output(writer,
dest);
3286 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3291 hr = IMXWriter_put_output(writer,
dest);
3292 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3295 hr = IMXWriter_flush(writer);
3296 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3300 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
3301 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3302 ok(pos2.
QuadPart == 0,
"expected stream beginning\n");
3304 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
3307 hr = ISAXContentHandler_startDocument(
content);
3311 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
3312 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3313 ok(pos2.
QuadPart != 0,
"expected stream beginning\n");
3316 hr = ISAXContentHandler_startDocument(
content);
3319 hr = ISAXContentHandler_endDocument(
content);
3324 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
3325 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3326 ok(pos2.
QuadPart != 0,
"expected stream position moved\n");
3337 hr = IMXWriter_put_output(writer,
dest);
3340 hr = IMXWriter_put_byteOrderMark(writer, VARIANT_FALSE);
3343 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
3346 hr = ISAXContentHandler_startDocument(
content);
3355 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
3357 ok(pos2.
QuadPart == 0,
"expected stream beginning\n");
3368 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
3370 ok(pos2.
QuadPart != 0,
"unexpected stream beginning\n");
3372 hr = IMXWriter_get_output(writer,
NULL);
3377 hr = IMXWriter_get_output(writer, &
dest);
3384 hr = ISAXContentHandler_endDocument(
content);
3394 hr = ISAXContentHandler_startDocument(
content);
3402 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
3404 ok(pos2.
QuadPart == 0,
"expected stream beginning\n");
3413 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
3415 ok(pos2.
QuadPart == 0,
"expected stream beginning\n");
3417 hr = ISAXContentHandler_endDocument(
content);
3422 hr = IMXWriter_put_output(writer,
dest);
3425 hr = ISAXContentHandler_startDocument(
content);
3437 hr = IMXWriter_get_output(writer, &
dest);
3444 ISAXContentHandler_Release(
content);
3446 IMXWriter_Release(writer);
3458 &IID_IMXWriter, (
void**)&writer);
3459 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3461 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
3464 hr = ISAXContentHandler_startDocument(
content);
3467 hr = ISAXContentHandler_endDocument(
content);
3471 hr = IMXWriter_get_output(writer, &
dest);
3479 hr = ISAXContentHandler_startDocument(
content);
3483 hr = IMXWriter_get_output(writer, &
dest);
3486 ok(!
lstrcmpW(
_bstr_(
"<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"no\"?>\r\n"
3487 "<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"no\"?>\r\n"),
V_BSTR(&
dest)),
3491 ISAXContentHandler_Release(
content);
3492 IMXWriter_Release(writer);
3496 &IID_IMXWriter, (
void**)&writer);
3497 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3499 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
3502 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
3505 hr = ISAXContentHandler_startDocument(
content);
3508 hr = ISAXContentHandler_endDocument(
content);
3512 hr = IMXWriter_get_output(writer, &
dest);
3518 ISAXContentHandler_Release(
content);
3519 IMXWriter_Release(writer);
3543static const char startelement_xml[] =
"<uri:local a:attr1=\"a1\" attr2=\"a2\" attr3=\"<&">\'\">";
3544static const char startendelement_xml[] =
"<uri:local a:attr1=\"a1\" attr2=\"a2\" attr3=\"<&">\'\"/>";
3568 { &CLSID_MXXMLWriter,
StartElement,
"uri",
"local",
"qname",
"<qname>",
S_OK },
3569 { &CLSID_MXXMLWriter30,
StartElement,
"uri",
"local",
"qname",
"<qname>",
S_OK },
3570 { &CLSID_MXXMLWriter40,
StartElement,
"uri",
"local",
"qname",
"<qname>",
S_OK },
3571 { &CLSID_MXXMLWriter60,
StartElement,
"uri",
"local",
"qname",
"<qname>",
S_OK },
3577 { &CLSID_MXXMLWriter,
StartElement,
"uri",
"local",
"uri:local",
"<uri:local>",
S_OK },
3579 { &CLSID_MXXMLWriter30,
StartElement,
"uri",
"local",
"uri:local",
"<uri:local>",
S_OK },
3580 { &CLSID_MXXMLWriter40,
StartElement,
"uri",
"local",
"uri:local",
"<uri:local>",
S_OK },
3581 { &CLSID_MXXMLWriter60,
StartElement,
"uri",
"local",
"uri:local",
"<uri:local>",
S_OK },
3582 { &CLSID_MXXMLWriter,
StartElement,
"uri",
"local",
"uri:local2",
"<uri:local2>",
S_OK },
3583 { &CLSID_MXXMLWriter30,
StartElement,
"uri",
"local",
"uri:local2",
"<uri:local2>",
S_OK },
3585 { &CLSID_MXXMLWriter40,
StartElement,
"uri",
"local",
"uri:local2",
"<uri:local2>",
S_OK },
3586 { &CLSID_MXXMLWriter60,
StartElement,
"uri",
"local",
"uri:local2",
"<uri:local2>",
S_OK },
3607 { &CLSID_MXXMLWriter,
EndElement,
"uri",
"local",
"qname",
"</qname>",
S_OK },
3608 { &CLSID_MXXMLWriter30,
EndElement,
"uri",
"local",
"qname",
"</qname>",
S_OK },
3610 { &CLSID_MXXMLWriter40,
EndElement,
"uri",
"local",
"qname",
"</qname>",
S_OK },
3611 { &CLSID_MXXMLWriter60,
EndElement,
"uri",
"local",
"qname",
"</qname>",
S_OK },
3617 { &CLSID_MXXMLWriter,
EndElement,
"uri",
"local",
"uri:local",
"</uri:local>",
S_OK },
3618 { &CLSID_MXXMLWriter30,
EndElement,
"uri",
"local",
"uri:local",
"</uri:local>",
S_OK },
3619 { &CLSID_MXXMLWriter40,
EndElement,
"uri",
"local",
"uri:local",
"</uri:local>",
S_OK },
3620 { &CLSID_MXXMLWriter60,
EndElement,
"uri",
"local",
"uri:local",
"</uri:local>",
S_OK },
3622 { &CLSID_MXXMLWriter,
EndElement,
"uri",
"local",
"uri:local2",
"</uri:local2>",
S_OK },
3623 { &CLSID_MXXMLWriter30,
EndElement,
"uri",
"local",
"uri:local2",
"</uri:local2>",
S_OK },
3624 { &CLSID_MXXMLWriter40,
EndElement,
"uri",
"local",
"uri:local2",
"</uri:local2>",
S_OK },
3625 { &CLSID_MXXMLWriter60,
EndElement,
"uri",
"local",
"uri:local2",
"</uri:local2>",
S_OK },
3656 while (
table->clsid)
3662 if (
hr ==
S_OK) IUnknown_Release(unk);
3675 while (
table->clsid)
3689 &IID_IMXWriter, (
void**)&writer);
3692 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
3695 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
3698 hr = ISAXContentHandler_startDocument(
content);
3703 hr = IMXWriter_put_disableOutputEscaping(writer, VARIANT_TRUE);
3712 ok(
hr ==
table->hr,
"test %d: got 0x%08x, expected 0x%08x\n",
i,
hr,
table->hr);
3720 ok(
hr ==
table->hr,
"test %d: got 0x%08x, expected 0x%08x\n",
i,
hr,
table->hr);
3729 hr = IMXWriter_get_output(writer, &
dest);
3737 ISAXContentHandler_Release(
content);
3738 IMXWriter_Release(writer);
3759 { &CLSID_MXXMLWriter,
"a", -1,
"b", -1,
"<a/>",
S_OK },
3760 { &CLSID_MXXMLWriter30,
"a", -1,
"b", -1,
"<a/>",
S_OK },
3761 { &CLSID_MXXMLWriter40,
"a", -1,
"b", -1,
"<a/>",
S_OK },
3763 { &CLSID_MXXMLWriter60,
"a", -1,
"b", -1,
"<a/>",
E_INVALIDARG },
3765 { &CLSID_MXXMLWriter,
"a", 1,
"b", 1,
"<a/>",
S_OK },
3766 { &CLSID_MXXMLWriter30,
"a", 1,
"b", 1,
"<a/>",
S_OK },
3767 { &CLSID_MXXMLWriter40,
"a", 1,
"b", 1,
"<a/>",
S_OK },
3768 { &CLSID_MXXMLWriter60,
"a", 1,
"b", 1,
"<a/>",
S_OK },
3776 while (
table->clsid)
3790 &IID_IMXWriter, (
void**)&writer);
3793 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
3796 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
3799 hr = ISAXContentHandler_startDocument(
content);
3804 ok(
hr ==
table->hr,
"test %d: got 0x%08x, expected 0x%08x\n",
i,
hr,
table->hr);
3808 ok(
hr ==
table->hr,
"test %d: got 0x%08x, expected 0x%08x\n",
i,
hr,
table->hr);
3816 hr = IMXWriter_get_output(writer, &
dest);
3824 ISAXContentHandler_Release(
content);
3825 IMXWriter_Release(writer);
3846 &IID_IMXWriter, (
void**)&writer);
3847 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
3849 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
3852 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
3855 hr = ISAXContentHandler_startDocument(
content);
3863 hr = IMXWriter_get_output(writer, &
dest);
3873 hr = IMXWriter_get_output(writer, &
dest);
3893 hr = IMXWriter_get_output(writer, &
dest);
3899 hr = ISAXContentHandler_endDocument(
content);
3903 hr = IMXWriter_put_output(writer,
dest);
3907 hr = IMXWriter_get_output(writer, &
dest);
3913 hr = ISAXContentHandler_startDocument(
content);
3920 hr = IMXWriter_get_output(writer, &
dest);
3926 hr = ISAXContentHandler_endDocument(
content);
3928 IMXWriter_flush(writer);
3933 hr = IMXWriter_get_output(writer, &
dest);
3940 hr = IMXWriter_put_output(writer,
dest);
3947 hr = IMXWriter_get_output(writer, &
dest);
3953 ISAXContentHandler_Release(
content);
3954 IMXWriter_Release(writer);
3965 { &CLSID_MXXMLWriter,
"< > & \" \'",
"< > & \" \'" },
3966 { &CLSID_MXXMLWriter30,
"< > & \" \'",
"< > & \" \'" },
3967 { &CLSID_MXXMLWriter40,
"< > & \" \'",
"< > & \" \'" },
3968 { &CLSID_MXXMLWriter60,
"< > & \" \'",
"< > & \" \'" },
3974 static const WCHAR chardataW[] = {
'T',
'E',
'S',
'T',
'C',
'H',
'A',
'R',
'D',
'A',
'T',
'A',
' ',
'.',0};
3975 static const WCHAR embedded_nullbytes[] = {
'a',0,
'b',0,0,0,
'c',0};
3977 IVBSAXContentHandler *vb_content;
3986 &IID_IMXWriter, (
void**)&writer);
3989 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
3992 hr = IMXWriter_QueryInterface(writer, &IID_IVBSAXContentHandler, (
void**)&vb_content);
3995 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
3998 hr = ISAXContentHandler_startDocument(
content);
4004 hr = ISAXContentHandler_characters(
content, chardataW, 0);
4008 hr = IVBSAXContentHandler_characters(vb_content, &
str);
4015 hr = IMXWriter_get_output(writer, &
dest);
4021 hr = ISAXContentHandler_endDocument(
content);
4024 ISAXContentHandler_Release(
content);
4025 IVBSAXContentHandler_Release(vb_content);
4026 IMXWriter_Release(writer);
4030 &IID_IMXWriter, (
void**)&writer);
4033 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4036 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
4039 hr = ISAXContentHandler_startDocument(
content);
4045 hr = ISAXContentHandler_characters(
content, chardataW, 0);
4052 hr = IMXWriter_get_output(writer, &
dest);
4058 ISAXContentHandler_Release(
content);
4059 IMXWriter_Release(writer);
4063 &IID_IMXWriter, (
void**)&writer);
4066 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4069 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
4072 hr = ISAXContentHandler_startDocument(
content);
4075 hr = ISAXContentHandler_characters(
content, embedded_nullbytes,
ARRAY_SIZE(embedded_nullbytes));
4079 hr = IMXWriter_get_output(writer, &
dest);
4087 ISAXContentHandler_Release(
content);
4088 IMXWriter_Release(writer);
4091 &IID_IMXWriter, (
void**)&writer);
4094 hr = IMXWriter_QueryInterface(writer, &IID_IVBSAXContentHandler, (
void**)&vb_content);
4097 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
4100 hr = IVBSAXContentHandler_startDocument(vb_content);
4104 hr = IVBSAXContentHandler_characters(vb_content, &
str);
4109 hr = IMXWriter_get_output(writer, &
dest);
4117 IVBSAXContentHandler_Release(vb_content);
4118 IMXWriter_Release(writer);
4121 while (
table->clsid)
4136 &IID_IMXWriter, (
void**)&writer);
4139 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4142 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
4145 hr = ISAXContentHandler_startDocument(
content);
4155 hr = IMXWriter_get_output(writer, &
dest);
4165 hr = IMXWriter_put_output(writer,
dest);
4168 hr = IMXWriter_put_disableOutputEscaping(writer, VARIANT_TRUE);
4178 hr = IMXWriter_get_output(writer, &
dest);
4186 ISAXContentHandler_Release(
content);
4187 IMXWriter_Release(writer);
4198 VARIANT_TRUE,
"UTF-16",
4206 VARIANT_FALSE,
"UTF-16",
4213 VARIANT_TRUE,
"UTF-8",
4224 VARIANT_TRUE,
"utf-8",
4235 VARIANT_TRUE,
"UTF-16",
4243 VARIANT_TRUE,
"UTF-16",
4267 &IID_IMXWriter, (
void**)&writer);
4268 ok(
hr ==
S_OK,
"CoCreateInstance failed: %08x\n",
hr);
4270 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4271 ok(
hr ==
S_OK,
"QueryInterface(ISAXContentHandler) failed: %08x\n",
hr);
4273 hr = IMXWriter_put_encoding(writer,
_bstr_(
test->encoding));
4278 hr = IMXWriter_put_output(writer,
dest);
4281 hr = IMXWriter_put_byteOrderMark(writer,
test->bom);
4286 hr = ISAXContentHandler_startDocument(
content);
4289 hr = ISAXContentHandler_endDocument(
content);
4292 ISAXContentHandler_Release(
content);
4293 IMXWriter_Release(writer);
4300 &IID_IMXWriter, (
void**)&writer);
4301 ok(
hr ==
S_OK,
"CoCreateInstance failed: %08x\n",
hr);
4304 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal failed: %08x\n",
hr);
4306 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4307 ok(
hr ==
S_OK,
"QueryInterface(ISAXContentHandler) failed: %08x\n",
hr);
4309 hr = IMXWriter_put_encoding(writer,
_bstr_(
"UTF-8"));
4310 ok(
hr ==
S_OK,
"put_encoding failed: %08x\n",
hr);
4314 hr = IMXWriter_put_output(writer,
dest);
4315 ok(
hr ==
S_OK,
"put_output failed: %08x\n",
hr);
4317 hr = ISAXContentHandler_startDocument(
content);
4318 ok(
hr ==
S_OK,
"startDocument failed: %08x\n",
hr);
4324 hr = IMXWriter_put_output(writer,
dest);
4325 ok(
hr ==
S_OK,
"put_output failed: %08x\n",
hr);
4328 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
4330 ok(pos2.
QuadPart != 0,
"expected stream position moved\n");
4332 hr = ISAXContentHandler_startDocument(
content);
4333 ok(
hr ==
S_OK,
"startDocument failed: %08x\n",
hr);
4335 hr = ISAXContentHandler_endDocument(
content);
4336 ok(
hr ==
S_OK,
"endDocument failed: %08x\n",
hr);
4339 hr = IMXWriter_get_output(writer, &
dest);
4340 ok(
hr ==
S_OK,
"get_output failed: %08x\n",
hr);
4348 hr = IMXWriter_put_output(writer,
dest);
4357 hr = IMXWriter_put_output(writer,
dest);
4360 hr = IMXWriter_put_byteOrderMark(writer, VARIANT_TRUE);
4363 hr = IMXWriter_put_encoding(writer,
_bstr_(
"UTF-16"));
4366 hr = ISAXContentHandler_startDocument(
content);
4371 hr = IStream_Seek(
stream,
pos, STREAM_SEEK_CUR, &pos2);
4373 ok(pos2.
QuadPart == 2,
"got wrong position\n");
4376 ISAXContentHandler_Release(
content);
4377 IMXWriter_Release(writer);
4409 &IID_IMXWriter, (
void**)&writer);
4412 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4415 hr = IMXWriter_put_encoding(writer,
_bstr_(
"UTF-8"));
4418 hr = ISAXContentHandler_startDocument(
content);
4421 hr = ISAXContentHandler_endDocument(
content);
4428 hr = IMXWriter_get_output(writer, &
dest);
4441 hr = IMXWriter_put_output(writer,
dest);
4444 hr = IMXWriter_put_encoding(writer,
_bstr_(
"UTF-8"));
4455 hr = IMXWriter_put_encoding(writer,
_bstr_(
"UTF-16"));
4458 hr = IMXWriter_flush(writer);
4469 hr = IMXWriter_get_encoding(writer, &
s);
4480 char expectedA[200];
4487 hr = IMXWriter_put_output(writer,
dest);
4490 hr = IMXWriter_put_encoding(writer,
_bstr_(enc));
4492 "%s: encoding not accepted\n", enc);
4500 hr = ISAXContentHandler_startDocument(
content);
4503 hr = ISAXContentHandler_endDocument(
content);
4506 hr = IMXWriter_flush(writer);
4511 strcat(expectedA,
"<?xml version=\"1.0\" encoding=\"");
4513 strcat(expectedA,
"\" standalone=\"no\"?>\r\n");
4519 ok(!
strncmp(
ptr, expectedA,
strlen(expectedA)),
"%s: got %s, expected %.50s\n", enc,
ptr, expectedA);
4523 hr = IMXWriter_put_output(writer,
dest);
4531 ISAXContentHandler_Release(
content);
4532 IMXWriter_Release(writer);
4539 static const WCHAR testW[] = {
't',
'e',
's',
't',
'p',
'r',
'o',
'p',0};
4550 hr = IUnknown_QueryInterface(
obj, &IID_IDispatchEx, (
void**)&dispex);
4555 hr = IDispatchEx_GetTypeInfoCount(dispex, &ticnt);
4557 ok(ticnt == 1,
"ticnt=%u\n", ticnt);
4560 hr = IDispatchEx_DeleteMemberByName(dispex,
name, fdexNameCaseSensitive);
4564 hr = IDispatchEx_DeleteMemberByDispID(dispex, dispid);
4568 hr = IDispatchEx_GetMemberProperties(dispex, dispid, grfdexPropCanAll, &
props);
4572 hr = IDispatchEx_GetMemberName(dispex, dispid, &
name);
4580 hr = IDispatchEx_GetNameSpaceParent(dispex, &unk);
4582 ok(unk == (
IUnknown*)0xdeadbeef,
"got %p\n", unk);
4585 hr = IDispatchEx_GetDispID(dispex,
name, fdexNameEnsure, &did);
4589 IDispatchEx_Release(dispex);
4594 IVBSAXXMLReader *vbreader;
4596 DISPPARAMS dispparams;
4603 &IID_ISAXXMLReader, (
void**)&
reader);
4609 IUnknown_Release(unk);
4611 hr = ISAXXMLReader_QueryInterface(
reader, &IID_IVBSAXXMLReader, (
void**)&vbreader);
4613 hr = IVBSAXXMLReader_QueryInterface(vbreader, &
IID_IUnknown, (
void**)&unk);
4616 IUnknown_Release(unk);
4618 dispid = DISPID_PROPERTYPUT;
4619 dispparams.cArgs = 1;
4620 dispparams.cNamedArgs = 1;
4621 dispparams.rgdispidNamedArgs = &dispid;
4622 dispparams.rgvarg = &
arg;
4628 hr = IVBSAXXMLReader_Invoke(vbreader,
4639 hr = IVBSAXXMLReader_Invoke(vbreader,
4650 IVBSAXXMLReader_Release(vbreader);
4651 ISAXXMLReader_Release(
reader);
4658 IUnknown_Release(unk);
4670 &IID_IMXWriter, (
void**)&writer);
4673 hr = IMXWriter_QueryInterface(writer, &IID_IDispatchEx, (
void**)&dispex);
4675 hr = IDispatchEx_QueryInterface(dispex, &
IID_IUnknown, (
void**)&unk);
4677 IUnknown_Release(unk);
4678 IDispatchEx_Release(dispex);
4679 IMXWriter_Release(writer);
4686 IUnknown_Release(unk);
4692 static const WCHAR commentW[] = {
'c',
'o',
'm',
'm',
'e',
'n',
't',0};
4693 IVBSAXLexicalHandler *vblexical;
4695 ISAXLexicalHandler *lexical;
4701 &IID_IMXWriter, (
void**)&writer);
4704 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4707 hr = IMXWriter_QueryInterface(writer, &IID_ISAXLexicalHandler, (
void**)&lexical);
4710 hr = IMXWriter_QueryInterface(writer, &IID_IVBSAXLexicalHandler, (
void**)&vblexical);
4713 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
4716 hr = ISAXContentHandler_startDocument(
content);
4719 hr = ISAXLexicalHandler_comment(lexical,
NULL, 0);
4722 hr = IVBSAXLexicalHandler_comment(vblexical,
NULL);
4725 hr = ISAXLexicalHandler_comment(lexical,
commentW, 0);
4729 hr = IMXWriter_get_output(writer, &
dest);
4739 hr = IMXWriter_get_output(writer, &
dest);
4745 ISAXContentHandler_Release(
content);
4746 ISAXLexicalHandler_Release(lexical);
4747 IVBSAXLexicalHandler_Release(vblexical);
4748 IMXWriter_Release(writer);
4754 IVBSAXLexicalHandler *vblexical;
4756 ISAXLexicalHandler *lexical;
4762 &IID_IMXWriter, (
void**)&writer);
4765 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4768 hr = IMXWriter_QueryInterface(writer, &IID_ISAXLexicalHandler, (
void**)&lexical);
4771 hr = IMXWriter_QueryInterface(writer, &IID_IVBSAXLexicalHandler, (
void**)&vblexical);
4774 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
4777 hr = ISAXContentHandler_startDocument(
content);
4780 hr = ISAXLexicalHandler_startCDATA(lexical);
4784 hr = IMXWriter_get_output(writer, &
dest);
4790 hr = IVBSAXLexicalHandler_startCDATA(vblexical);
4797 hr = ISAXLexicalHandler_endCDATA(lexical);
4801 hr = IMXWriter_get_output(writer, &
dest);
4807 ISAXContentHandler_Release(
content);
4808 ISAXLexicalHandler_Release(lexical);
4809 IVBSAXLexicalHandler_Release(vblexical);
4810 IMXWriter_Release(writer);
4816 static const WCHAR targetW[] = {
't',
'a',
'r',
'g',
'e',
't',0};
4817 static const WCHAR dataW[] = {
'd',
'a',
't',
'a',0};
4824 &IID_IMXWriter, (
void**)&writer);
4827 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4833 hr = ISAXContentHandler_processingInstruction(
content, targetW, 0,
NULL, 0);
4836 hr = ISAXContentHandler_processingInstruction(
content, targetW, 6,
NULL, 0);
4840 hr = IMXWriter_get_output(writer, &
dest);
4846 hr = ISAXContentHandler_processingInstruction(
content, targetW, 4, dataW, 4);
4850 hr = IMXWriter_get_output(writer, &
dest);
4857 hr = IMXWriter_put_output(writer,
dest);
4860 hr = ISAXContentHandler_processingInstruction(
content, targetW, 6, dataW, 0);
4864 hr = IMXWriter_get_output(writer, &
dest);
4871 ISAXContentHandler_Release(
content);
4872 IMXWriter_Release(writer);
4877 static const WCHAR dataW[] = {
'd',
'a',
't',
'a',0};
4884 &IID_IMXWriter, (
void**)&writer);
4887 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4890 hr = ISAXContentHandler_ignorableWhitespace(
content,
NULL, 0);
4893 hr = ISAXContentHandler_ignorableWhitespace(
content, dataW, 0);
4896 hr = ISAXContentHandler_ignorableWhitespace(
content, dataW, 4);
4899 hr = ISAXContentHandler_ignorableWhitespace(
content, dataW, 1);
4903 hr = IMXWriter_get_output(writer, &
dest);
4909 ISAXContentHandler_Release(
content);
4910 IMXWriter_Release(writer);
4915 static const WCHAR contentW[] = {
'c',
'o',
'n',
't',
'e',
'n',
't'};
4916 static const WCHAR nameW[] = {
'n',
'a',
'm',
'e'};
4917 static const WCHAR pubW[] = {
'p',
'u',
'b'};
4918 static const WCHAR sysW[] = {
's',
'y',
's'};
4919 IVBSAXLexicalHandler *vblexical;
4921 ISAXLexicalHandler *lexical;
4922 IVBSAXDeclHandler *vbdecl;
4923 ISAXDeclHandler *decl;
4924 ISAXDTDHandler *dtd;
4930 &IID_IMXWriter, (
void**)&writer);
4933 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
4936 hr = IMXWriter_QueryInterface(writer, &IID_ISAXLexicalHandler, (
void**)&lexical);
4939 hr = IMXWriter_QueryInterface(writer, &IID_ISAXDeclHandler, (
void**)&decl);
4942 hr = IMXWriter_QueryInterface(writer, &IID_IVBSAXDeclHandler, (
void**)&vbdecl);
4945 hr = IMXWriter_QueryInterface(writer, &IID_IVBSAXLexicalHandler, (
void**)&vblexical);
4948 hr = IMXWriter_put_omitXMLDeclaration(writer, VARIANT_TRUE);
4951 hr = ISAXContentHandler_startDocument(
content);
4954 hr = ISAXLexicalHandler_startDTD(lexical,
NULL, 0,
NULL, 0,
NULL, 0);
4973 hr = IMXWriter_get_output(writer, &
dest);
4988 hr = IMXWriter_get_output(writer, &
dest);
4995 hr = ISAXLexicalHandler_endDTD(lexical);
4998 hr = IVBSAXLexicalHandler_endDTD(vblexical);
5002 hr = IMXWriter_get_output(writer, &
dest);
5006 "<!DOCTYPE name PUBLIC \"pub\" \"sys\" [\r\n]>\r\n]>\r\n"),
5012 hr = IMXWriter_put_output(writer,
dest);
5015 hr = ISAXDeclHandler_elementDecl(decl,
NULL, 0,
NULL, 0);
5018 hr = IVBSAXDeclHandler_elementDecl(vbdecl,
NULL,
NULL);
5028 hr = IMXWriter_get_output(writer, &
dest);
5036 hr = IMXWriter_put_output(writer,
dest);
5043 hr = IMXWriter_get_output(writer, &
dest);
5052 hr = IMXWriter_put_output(writer,
dest);
5055 hr = ISAXDeclHandler_attributeDecl(decl,
_bstr_(
"element"),
strlen(
"element"),
5061 hr = IMXWriter_get_output(writer, &
dest);
5064 ok(!
lstrcmpW(
_bstr_(
"<!ATTLIST element attribute CDATA #REQUIRED \"value\">\r\n"),
5068 hr = ISAXDeclHandler_attributeDecl(decl,
_bstr_(
"element"),
strlen(
"element"),
5073 hr = ISAXDeclHandler_attributeDecl(decl,
_bstr_(
"element2"),
strlen(
"element2"),
5079 hr = IMXWriter_get_output(writer, &
dest);
5082 ok(!
lstrcmpW(
_bstr_(
"<!ATTLIST element attribute CDATA #REQUIRED \"value\">\r\n"
5083 "<!ATTLIST element attribute2 CDATA #REQUIRED \"value2\">\r\n"
5084 "<!ATTLIST element2 attribute3 CDATA #REQUIRED \"value3\">\r\n"),
5090 hr = IMXWriter_put_output(writer,
dest);
5093 hr = ISAXDeclHandler_internalEntityDecl(decl,
NULL, 0,
NULL, 0);
5096 hr = IVBSAXDeclHandler_internalEntityDecl(vbdecl,
NULL,
NULL);
5099 hr = ISAXDeclHandler_internalEntityDecl(decl,
_bstr_(
"name"), -1,
NULL, 0);
5106 hr = IMXWriter_get_output(writer, &
dest);
5114 hr = IMXWriter_put_output(writer,
dest);
5117 hr = ISAXDeclHandler_externalEntityDecl(decl,
NULL, 0,
NULL, 0,
NULL, 0);
5120 hr = IVBSAXDeclHandler_externalEntityDecl(vbdecl,
NULL,
NULL,
NULL);
5123 hr = ISAXDeclHandler_externalEntityDecl(decl,
_bstr_(
"name"), 0,
NULL, 0,
NULL, 0);
5126 hr = ISAXDeclHandler_externalEntityDecl(decl,
_bstr_(
"name"), -1,
NULL, 0,
NULL, 0);
5141 hr = IMXWriter_get_output(writer, &
dest);
5145 "<!ENTITY name PUBLIC \"pubid\" \"sysid\">\r\n"
5146 "<!ENTITY name SYSTEM \"sysid\">\r\n"),
5152 hr = IMXWriter_QueryInterface(writer, &IID_ISAXDTDHandler, (
void**)&dtd);
5156 hr = IMXWriter_put_output(writer,
dest);
5159 hr = ISAXDTDHandler_notationDecl(dtd,
NULL, 0,
NULL, 0,
NULL, 0);
5174 hr = IMXWriter_get_output(writer, &
dest);
5179 "<!NOTATION name PUBLIC \"pubid\">\r\n"
5180 "<!NOTATION name PUBLIC \"pubid\" \"sysid\">\r\n"
5181 "<!NOTATION name SYSTEM \"sysid\">\r\n"),
5186 ISAXDTDHandler_Release(dtd);
5188 ISAXContentHandler_Release(
content);
5189 ISAXLexicalHandler_Release(lexical);
5190 IVBSAXLexicalHandler_Release(vblexical);
5191 IVBSAXDeclHandler_Release(vbdecl);
5192 ISAXDeclHandler_Release(decl);
5193 IMXWriter_Release(writer);
5216 { &CLSID_SAXAttributes60,
NULL,
"qname",
"ns:qname",
NULL,
"value",
S_OK },
5218 { &CLSID_SAXAttributes,
"uri",
"qname",
"ns:qname",
NULL,
"value",
E_INVALIDARG },
5219 { &CLSID_SAXAttributes30,
"uri",
"qname",
"ns:qname",
NULL,
"value",
E_INVALIDARG },
5220 { &CLSID_SAXAttributes40,
"uri",
"qname",
"ns:qname",
NULL,
"value",
E_INVALIDARG },
5221 { &CLSID_SAXAttributes60,
"uri",
"qname",
"ns:qname",
NULL,
"value",
S_OK },
5223 { &CLSID_SAXAttributes,
"uri",
"qname",
"ns:qname",
"type",
"value",
S_OK },
5224 { &CLSID_SAXAttributes30,
"uri",
"qname",
"ns:qname",
"type",
"value",
S_OK },
5225 { &CLSID_SAXAttributes40,
"uri",
"qname",
"ns:qname",
"type",
"value",
S_OK },
5226 { &CLSID_SAXAttributes60,
"uri",
"qname",
"ns:qname",
"type",
"value",
S_OK },
5236 while (
table->clsid)
5238 ISAXAttributes *saxattr;
5239 IMXAttributes *mxattr;
5252 &IID_IMXAttributes, (
void**)&mxattr);
5255 hr = IMXAttributes_QueryInterface(mxattr, &IID_ISAXAttributes, (
void**)&saxattr);
5262 hr = ISAXAttributes_getLength(saxattr,
NULL);
5267 hr = ISAXAttributes_getLength(saxattr, &
len);
5271 hr = ISAXAttributes_getValue(saxattr, 0, &
value, &
len);
5274 hr = ISAXAttributes_getValue(saxattr, 0,
NULL, &
len);
5277 hr = ISAXAttributes_getValue(saxattr, 0, &
value,
NULL);
5280 hr = ISAXAttributes_getValue(saxattr, 0,
NULL,
NULL);
5283 hr = ISAXAttributes_getType(saxattr, 0, &
value, &
len);
5286 hr = ISAXAttributes_getType(saxattr, 0,
NULL, &
len);
5289 hr = ISAXAttributes_getType(saxattr, 0, &
value,
NULL);
5292 hr = ISAXAttributes_getType(saxattr, 0,
NULL,
NULL);
5305 hr = ISAXAttributes_getValue(saxattr, 0,
NULL, &
len);
5308 hr = ISAXAttributes_getValue(saxattr, 0, &
value,
NULL);
5311 hr = ISAXAttributes_getValue(saxattr, 0,
NULL,
NULL);
5314 hr = ISAXAttributes_getType(saxattr, 0,
NULL, &
len);
5317 hr = ISAXAttributes_getType(saxattr, 0, &
value,
NULL);
5320 hr = ISAXAttributes_getType(saxattr, 0,
NULL,
NULL);
5325 hr = ISAXAttributes_getValue(saxattr, 0, &
value, &
len);
5332 value = (
void*)0xdeadbeef;
5333 hr = ISAXAttributes_getType(saxattr, 0, &
value, &
len);
5345 ok(
len == 0,
"%d: got wrong type value length %d\n",
i,
len);
5348 hr = ISAXAttributes_getIndexFromQName(saxattr,
NULL, 0,
NULL);
5357 hr = ISAXAttributes_getIndexFromQName(saxattr,
NULL, 0, &
index);
5361 hr = ISAXAttributes_getIndexFromQName(saxattr,
_bstr_(
"nonexistent"), 11, &
index);
5383 hr = ISAXAttributes_getValueFromQName(saxattr,
NULL, 0,
NULL,
NULL);
5403 hr = ISAXAttributes_getValueFromQName(saxattr,
NULL, 0,
NULL,
NULL);
5456 hr = ISAXAttributes_getLength(saxattr, &
len);
5459 ok(
len == 1,
"%d: got %d length, expected 1\n",
i,
len);
5461 ok(
len == 0,
"%d: got %d length, expected 0\n",
i,
len);
5463 ISAXAttributes_Release(saxattr);
5464 IMXAttributes_Release(mxattr);
5475 ISAXAttributes *saxattr;
5476 IMXAttributes *mxattr;
5482 &IID_IMXAttributes, (
void**)&mxattr);
5485 hr = IMXAttributes_QueryInterface(mxattr, &IID_ISAXAttributes, (
void**)&saxattr);
5488 hr = ISAXAttributes_getQName(saxattr, 0,
NULL,
NULL);
5491 hr = ISAXAttributes_getQName(saxattr, 0, &
ptr, &
len);
5494 hr = IMXAttributes_clear(mxattr);
5497 hr = IMXAttributes_addAttribute(mxattr,
_bstr_(
"uri"),
_bstr_(
"local"),
5502 hr = ISAXAttributes_getLength(saxattr, &
len);
5507 hr = ISAXAttributes_getQName(saxattr, 0,
NULL, &
len);
5511 ptr = (
void*)0xdeadbeef;
5512 hr = ISAXAttributes_getQName(saxattr, 0, &
ptr,
NULL);
5514 ok(
ptr == (
void*)0xdeadbeef,
"got %p\n",
ptr);
5517 hr = ISAXAttributes_getQName(saxattr, 0, &
ptr, &
len);
5522 hr = IMXAttributes_clear(mxattr);
5526 hr = ISAXAttributes_getLength(saxattr, &
len);
5531 ptr = (
void*)0xdeadbeef;
5532 hr = ISAXAttributes_getQName(saxattr, 0, &
ptr, &
len);
5535 ok(
ptr == (
void*)0xdeadbeef,
"got %p\n",
ptr);
5537 IMXAttributes_Release(mxattr);
5538 ISAXAttributes_Release(saxattr);
5544 IMXAttributes *mxattr;
5550 &IID_IMXAttributes, (
void**)&mxattr);
5553 hr = IMXAttributes_QueryInterface(mxattr, &IID_IDispatchEx, (
void**)&dispex);
5555 hr = IDispatchEx_QueryInterface(dispex, &
IID_IUnknown, (
void**)&unk);
5557 IUnknown_Release(unk);
5558 IDispatchEx_Release(dispex);
5560 IMXAttributes_Release(mxattr);
5565 IVBSAXAttributes *vbsaxattr, *vbsaxattr2;
5566 ISAXAttributes *saxattr;
5567 IMXAttributes *mxattr;
5571 &IID_IMXAttributes, (
void**)&mxattr);
5575 hr = IMXAttributes_QueryInterface(mxattr, &IID_ISAXAttributes, (
void**)&saxattr);
5581 hr = IMXAttributes_QueryInterface(mxattr, &IID_IVBSAXAttributes, (
void**)&vbsaxattr);
5588 hr = ISAXAttributes_QueryInterface(saxattr, &IID_IVBSAXAttributes, (
void**)&vbsaxattr2);
5595 IMXAttributes_Release(mxattr);
5596 ISAXAttributes_Release(saxattr);
5597 IVBSAXAttributes_Release(vbsaxattr);
5598 IVBSAXAttributes_Release(vbsaxattr2);
5603 { &CLSID_SAXAttributes,
"SAXAttributes" },
5604 { &CLSID_SAXAttributes30,
"SAXAttributes30" },
5605 { &CLSID_SAXAttributes40,
"SAXAttributes40" },
5606 { &CLSID_SAXAttributes60,
"SAXAttributes60" },
5612 static const WCHAR localname1W[] = {
'l',
'o',
'c',
'a',
'l',
'n',
'a',
'm',
'e',
'1',0};
5613 static const WCHAR localnameW[] = {
'l',
'o',
'c',
'a',
'l',
'n',
'a',
'm',
'e',0};
5614 static const WCHAR uri1W[] = {
'u',
'r',
'i',
'1',0};
5615 static const WCHAR uriW[] = {
'u',
'r',
'i',0};
5619 while (
table->clsid)
5621 ISAXAttributes *saxattr;
5622 IMXAttributes *mxattr;
5633 &IID_IMXAttributes, (
void**)&mxattr);
5636 hr = IMXAttributes_QueryInterface(mxattr, &IID_ISAXAttributes, (
void**)&saxattr);
5639 hr = ISAXAttributes_getIndexFromName(saxattr,
NULL, 0,
NULL, 0, &
index);
5643 hr = IMXAttributes_addAttribute(mxattr,
_bstr_(
"uri"),
_bstr_(
"localname"),
5646 hr = IMXAttributes_addAttribute(mxattr,
_bstr_(
"uri"),
_bstr_(
"localname"),
5651 hr = ISAXAttributes_getIndexFromName(saxattr, uriW,
lstrlenW(uriW), localnameW,
lstrlenW(localnameW), &
index);
5656 hr = ISAXAttributes_getIndexFromName(saxattr, uri1W,
lstrlenW(uri1W), localnameW,
lstrlenW(localnameW), &
index);
5661 hr = ISAXAttributes_getIndexFromName(saxattr, uriW,
lstrlenW(uriW), localname1W,
lstrlenW(localname1W), &
index);
5668 hr = ISAXAttributes_getIndexFromName(saxattr,
NULL, 0,
NULL, 0,
NULL);
5671 hr = ISAXAttributes_getIndexFromName(saxattr, uriW,
lstrlenW(uriW), localname1W,
lstrlenW(localname1W),
NULL);
5676 hr = ISAXAttributes_getIndexFromName(saxattr,
NULL, 0,
NULL, 0,
NULL);
5679 hr = ISAXAttributes_getIndexFromName(saxattr, uriW,
lstrlenW(uriW), localname1W,
lstrlenW(localname1W),
NULL);
5686 hr = ISAXAttributes_getIndexFromName(saxattr,
NULL, 0, localname1W,
lstrlenW(localname1W), &
index);
5691 ISAXAttributes_Release(saxattr);
5692 IMXAttributes_Release(mxattr);
5705 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
5707 hr = IMXWriter_put_indent(writer, VARIANT_TRUE);
5710 hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (
void**)&
content);
5713 hr = ISAXContentHandler_startDocument(
content);
5737 hr = ISAXContentHandler_endDocument(
content);
5741 hr = IMXWriter_get_output(writer, &
dest);
5744 ok(!
lstrcmpW(
_bstr_(
"<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"no\"?>\r\n<a><b>\r\n\t\t<c/>\r\n\t</b>\r\n</a>"),
V_BSTR(&
dest)),
5748 ISAXContentHandler_Release(
content);
5749 IMXWriter_Release(writer);
5760 ok(
hr ==
S_OK,
"failed to init com\n");
5763 &IID_ISAXXMLReader, (
void**)&
reader);
5767 win_skip(
"Failed to create SAXXMLReader instance\n");
5771 ISAXXMLReader_Release(
reader);
5804 win_skip(
"MXXMLWriter not supported\n");
5817 win_skip(
"SAXAttributes not supported\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
static struct sockaddr_in sa
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#define InterlockedIncrement
#define InterlockedDecrement
static const WCHAR nameW[]
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
UINT(* handler)(MSIPACKAGE *)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
static const WCHAR commentW[]
static unsigned char buff[32768]
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
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
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 GLint GLint j
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
static const WCHAR testW[]
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static IStream * create_test_stream(void)
static HMODULE MODULEINFO DWORD cb
#define todo_wine_if(is_todo)
static HRESULT get_expected_ret(void)
static const mxwriter_write_test * current_write_test
static struct attribute_entry read_test_attrs[]
static struct call_entry xmlspaceattr_test[]
static ISAXAttributes saxattributes
static HRESULT WINAPI contentHandler_startElement(ISAXContentHandler *iface, const WCHAR *uri, int uri_len, const WCHAR *localname, int local_len, const WCHAR *qname, int qname_len, ISAXAttributes *saxattr)
static struct call_entry cdata_test3_alt[]
static struct call_entry attribute_norm[]
static HRESULT WINAPI contentHandler_endDocument(ISAXContentHandler *iface)
static struct call_entry content_handler_test_attributes_alternate_6[]
static ULONG WINAPI isaxerrorHandler_Release(ISAXErrorHandler *iface)
static const struct writer_startendelement2_t writer_startendelement2[]
static BSTR _bstr_(const char *str)
static void test_mxwriter_dispex(void)
static struct call_entry cdata_test[]
static void test_mxattr_qi(void)
static HRESULT WINAPI istream_Commit(IStream *iface, DWORD grfCommitFlags)
static const struct saxreader_props_test_t props_test_data[]
static const char * get_event_name(CH event)
static HRESULT WINAPI isaxattributes_getTypeFromQName(ISAXAttributes *iface, const WCHAR *pQName, int nQName, const WCHAR **pType, int *nType)
static HRESULT WINAPI isaxlexical_QueryInterface(ISAXLexicalHandler *iface, REFIID riid, void **out)
static const char test2_cdata_xml[]
static const char startendelement_noescape_xml[]
static void test_mxwriter_pi(void)
static void test_mxwriter_handlers(void)
static ISAXContentHandler contentHandler
static HRESULT WINAPI contentHandler_skippedEntity(ISAXContentHandler *iface, const WCHAR *name, int len)
static ISAXErrorHandler errorHandler
static const char * encoding_names[]
static struct call_entry content_handler_test_attributes_alt_no_ns[]
static ULONG WINAPI isaxattributes_AddRef(ISAXAttributes *iface)
static ULONG WINAPI istream_Release(IStream *iface)
static HRESULT WINAPI isaxattributes_getLength(ISAXAttributes *iface, int *length)
static void test_mxwriter_flush(void)
static struct msxmlsupported_data_t mxwriter_support_data[]
static const struct mxwriter_props_t mxwriter_default_props[]
static struct call_entry content_handler_testerror[]
static struct msxmlsupported_data_t reader_support_data[]
static const char test3_cdata_xml[]
static void test_saxreader_properties(void)
static const struct enc_test_entry_t encoding_test_data[]
static void test_saxstr(const char *file, unsigned line, BSTR str, const char *expected, BOOL todo, int *failcount)
static void init_saxdeclhandler(struct saxdeclhandler *handler, HRESULT hr)
static void test_mxwriter_properties(void)
#define EXPECT_HR(hr, hr_exp)
static HRESULT WINAPI istream_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static void test_mxattr_clear(void)
static ULONG WINAPI isaxattributes_Release(ISAXAttributes *iface)
static BSTR alloc_str_from_narrow(const char *str)
static HRESULT WINAPI istream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
static ULONG WINAPI contentHandler_AddRef(ISAXContentHandler *iface)
static HRESULT WINAPI contentHandler_endPrefixMapping(ISAXContentHandler *iface, const WCHAR *prefix, int len)
static HRESULT WINAPI isaxerrorHandler_QueryInterface(ISAXErrorHandler *iface, REFIID riid, void **ppvObject)
static struct call_entry cdata_test2_alt[]
static void test_mxwriter_startendelement_batch(const struct writer_startendelement_t *table)
static struct msxmlsupported_data_t mxattributes_support_data[]
static void test_mxwriter_startenddocument(void)
static struct call_entry content_handler_test_attributes_no_prefix[]
static ISAXXMLReader * g_reader
static const char * event_names[EVENT_LAST]
@ CH_PROCESSINGINSTRUCTION
static ULONG WINAPI isaxdecl_Release(ISAXDeclHandler *iface)
static HRESULT WINAPI instream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
static struct call_entry cdata_test3[]
static const CHAR UTF8BOMTest[]
static const struct writer_characters_t writer_characters[]
static DWORD current_stream_test_index
static HRESULT WINAPI isaxerrorHandler_fatalError(ISAXErrorHandler *iface, ISAXLocator *pLocator, const WCHAR *message, HRESULT hr)
static const mxwriter_stream_test mxwriter_stream_tests[]
#define CONTENT_HANDLER_INDEX
static const CHAR szUtf16BOM[]
static HRESULT WINAPI isaxlexical_endCDATA(ISAXLexicalHandler *iface)
static HRESULT WINAPI contentHandler_characters(ISAXContentHandler *iface, const WCHAR *chars, int len)
static void _expect_ref(IUnknown *obj, ULONG ref, int line)
static struct saxlexicalhandler * impl_from_ISAXLexicalHandler(ISAXLexicalHandler *iface)
static void add_call(struct call_sequence **seq, int sequence_index, const struct call_entry *call)
static struct saxdeclhandler declhandler
static void test_mxwriter_comment(void)
static struct attribute_entry attribute_norm_attrs[]
static HRESULT WINAPI mxstream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
static const char attribute_normalize[]
static const char startelement_xml[]
static HRESULT WINAPI istream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
static struct attribute_entry ch_attributes1[]
static void test_mxattr_localname(void)
static int alloced_bstrs_count
static struct call_entry content_handler_test_callback_rets[]
static HRESULT WINAPI isaxattributes_getValue(ISAXAttributes *iface, int index, const WCHAR **value, int *nValue)
static HRESULT WINAPI isaxattributes_getValueFromQName(ISAXAttributes *iface, const WCHAR *pQName, int nQName, const WCHAR **pValue, int *nValue)
static ULONG WINAPI isaxerrorHandler_AddRef(ISAXErrorHandler *iface)
static HRESULT WINAPI isaxattributes_getValueFromName(ISAXAttributes *iface, const WCHAR *pUri, int nUri, const WCHAR *pLocalName, int nLocalName, const WCHAR **pValue, int *nValue)
static void free_bstrs(void)
static HRESULT WINAPI isaxattributes_getIndexFromName(ISAXAttributes *iface, const WCHAR *pUri, int cUriLength, const WCHAR *pLocalName, int cocalNameLength, int *index)
static HRESULT WINAPI contentHandler_ignorableWhitespace(ISAXContentHandler *iface, const WCHAR *chars, int len)
static const char xmlspace_attr[]
static struct attribute_entry xmlspace_attrs[]
static void test_saxreader(void)
static HRESULT WINAPI isaxdecl_internalEntityDecl(ISAXDeclHandler *iface, const WCHAR *pName, int nName, const WCHAR *pValue, int nValue)
static HRESULT WINAPI isaxerrorHandler_ignorableWarning(ISAXErrorHandler *iface, ISAXLocator *pLocator, const WCHAR *pErrorMessage, HRESULT hrErrorCode)
static struct call_entry content_handler_test_attributes_alt_no_prefix[]
static void test_mxwriter_characters(void)
static struct call_entry content_handler_test1[]
static struct call_entry cdata_test_alt[]
static struct call_entry xmlspaceattr_test_alternate[]
static HRESULT WINAPI contentHandler_QueryInterface(ISAXContentHandler *iface, REFIID riid, void **ppvObject)
static const char * feature_names[]
static void init_call_sequences(struct call_sequence **seq, int n)
static HRESULT WINAPI istream_Revert(IStream *iface)
static void test_mxattr_addAttribute(void)
static struct attribute_entry ch_attributes_alt_no_ns[]
static const char startendelement_xml[]
static struct saxdeclhandler * impl_from_ISAXDeclHandler(ISAXDeclHandler *iface)
static const WCHAR carriage_ret_test[]
static struct call_entry content_handler_test_callback_rets_alt[]
static HRESULT WINAPI istream_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI isaxdecl_QueryInterface(ISAXDeclHandler *iface, REFIID riid, void **out)
static const char test_cdata_xml[]
static HRESULT WINAPI contentHandler_startPrefixMapping(ISAXContentHandler *iface, const WCHAR *prefix, int prefix_len, const WCHAR *uri, int uri_len)
static void test_mxwriter_startendelement_batch2(const struct writer_startendelement2_t *table)
struct mxwriter_stream_test_t mxwriter_stream_test
static const addattribute_test_t addattribute_data[]
static void test_mxwriter_encoding(void)
static const ISAXLexicalHandlerVtbl SAXLexicalHandlerVtbl
static LONG get_refcount(void *iface)
static struct call_entry * expectCall
static HRESULT WINAPI contentHandler_putDocumentLocator(ISAXContentHandler *iface, ISAXLocator *pLocator)
static HRESULT WINAPI isaxattributes_getQName(ISAXAttributes *iface, int index, const WCHAR **QName, int *QNameLength)
#define ok_sequence(seq, index, exp, contx, todo)
static struct msxmlsupported_data_t saxattr_support_data[]
static HRESULT WINAPI isaxattributes_getType(ISAXAttributes *iface, int nIndex, const WCHAR **pType, int *pTypeLength)
static const CHAR szUtf8XML[]
static ULONG WINAPI istream_AddRef(IStream *iface)
static ISAXLocator * locator
static struct call_entry content_handler_test2[]
static const WCHAR szUtf16XML[]
static void ok_sequence_(struct call_sequence **seq, int sequence_index, const struct call_entry *expected, const char *context, BOOL todo, const char *file, int line)
static struct saxlexicalhandler lexicalhandler
static const IStreamVtbl instreamVtbl
static void test_mxwriter_stream(void)
static const WCHAR emptyW[]
static ULONG WINAPI isaxlexical_Release(ISAXLexicalHandler *iface)
static HRESULT WINAPI isaxlexical_endDTD(ISAXLexicalHandler *iface)
static struct call_entry attribute_norm_alt[]
static struct attribute_entry ch_attributes_alt_6[]
static HRESULT WINAPI isaxattributes_QueryInterface(ISAXAttributes *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI istream_Clone(IStream *iface, IStream **ppstm)
static HRESULT WINAPI isaxattributes_getName(ISAXAttributes *iface, int nIndex, const WCHAR **pUri, int *pUriLength, const WCHAR **pLocalName, int *pLocalNameSize, const WCHAR **pQName, int *pQNameLength)
static const ISAXContentHandlerVtbl contentHandlerVtbl
static HRESULT WINAPI isaxdecl_elementDecl(ISAXDeclHandler *iface, const WCHAR *pName, int nName, const WCHAR *pModel, int nModel)
static const ISAXErrorHandlerVtbl errorHandlerVtbl
static void test_saxreader_features(void)
static void test_saxreader_encoding(void)
#define EXPECT_REF(obj, ref)
static HRESULT WINAPI isaxattributes_getIndexFromQName(ISAXAttributes *iface, const WCHAR *pQName, int nQNameLength, int *index)
static const char utf8xml2[]
struct mxwriter_write_test_t mxwriter_write_test
static void test_mxwriter_ignorablespaces(void)
#define NUM_CALL_SEQUENCES
static BSTR alloced_bstrs[512]
static HRESULT WINAPI isaxlexical_startDTD(ISAXLexicalHandler *iface, const WCHAR *pName, int nName, const WCHAR *pPublicId, int nPublicId, const WCHAR *pSystemId, int nSystemId)
static struct call_entry content_handler_testerror_alternate[]
static const IStreamVtbl mxstreamVtbl
static struct call_entry content_handler_test1_alternate[]
static void test_mxwriter_indent(void)
static void init_saxlexicalhandler(struct saxlexicalhandler *handler, HRESULT hr)
static void get_class_support_data(struct msxmlsupported_data_t *table, REFIID riid)
static ULONG WINAPI isaxdecl_AddRef(ISAXDeclHandler *iface)
static HRESULT WINAPI istream_QueryInterface(IStream *iface, REFIID riid, void **ppvObject)
static ULONG WINAPI isaxlexical_AddRef(ISAXLexicalHandler *iface)
static HRESULT WINAPI contentHandler_endElement(ISAXContentHandler *iface, const WCHAR *uri, int uri_len, const WCHAR *localname, int local_len, const WCHAR *qname, int qname_len)
static HRESULT WINAPI isaxattributes_getLocalName(ISAXAttributes *iface, int nIndex, const WCHAR **pLocalName, int *pLocalNameLength)
static HRESULT WINAPI isaxattributes_getTypeFromName(ISAXAttributes *iface, const WCHAR *pUri, int nUri, const WCHAR *pLocalName, int nLocalName, const WCHAR **pType, int *nType)
static struct attribute_entry ch_attributes2[]
static struct call_entry content_handler_test2_alternate[]
static HRESULT WINAPI contentHandler_processingInstruction(ISAXContentHandler *iface, const WCHAR *target, int target_len, const WCHAR *data, int data_len)
static HRESULT WINAPI isaxerrorHandler_error(ISAXErrorHandler *iface, ISAXLocator *pLocator, const WCHAR *pErrorMessage, HRESULT hrErrorCode)
static void test_mxwriter_startendelement(void)
static HRESULT WINAPI istream_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *plibWritten)
static void init_call_entry(ISAXLocator *locator, struct call_entry *call)
static const struct writer_startendelement_t writer_startendelement[]
static HRESULT WINAPI isaxdecl_attributeDecl(ISAXDeclHandler *iface, const WCHAR *pElementName, int nElementName, const WCHAR *pAttributeName, int nAttributeName, const WCHAR *pType, int nType, const WCHAR *pValueDefault, int nValueDefault, const WCHAR *pValue, int nValue)
static struct attribute_entry ch_attributes_no_prefix[]
static HRESULT WINAPI isaxdecl_externalEntityDecl(ISAXDeclHandler *iface, const WCHAR *pName, int nName, const WCHAR *pPublicId, int nPublicId, const WCHAR *pSystemId, int nSystemId)
static HRESULT WINAPI isaxattributes_getURI(ISAXAttributes *iface, int nIndex, const WCHAR **pUrl, int *pUriSize)
static void test_saxreader_dispex(void)
static void test_mxwriter_dtd(void)
static const WCHAR szSimpleXML[]
static struct attribute_entry ch_attributes2_6[]
static struct call_entry read_test_seq[]
static const char test_attributes[]
static struct call_entry cdata_test2[]
static void test_mxwriter_default_properties(const struct mxwriter_props_t *table)
static HRESULT WINAPI istream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
static void test_mxwriter_cdata(void)
static HRESULT WINAPI contentHandler_startDocument(ISAXContentHandler *iface)
static struct call_sequence * sequences[NUM_CALL_SEQUENCES]
static struct attribute_entry ch_attributes_alt_4[]
static HRESULT WINAPI istream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static void compare_attributes(const struct call_entry *actual, const struct call_entry *expected, const char *context, BOOL todo, const char *file, int line, int *failcount)
static void test_obj_dispex(IUnknown *obj)
static HRESULT WINAPI istream_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
static const ISAXAttributesVtbl SAXAttributesVtbl
static HRESULT WINAPI isaxlexical_startCDATA(ISAXLexicalHandler *iface)
static HRESULT WINAPI isaxlexical_comment(ISAXLexicalHandler *iface, const WCHAR *pChars, int nChars)
static struct call_entry content_handler_test_attributes_alternate_4[]
static void set_expected_seq(struct call_entry *expected)
static BOOL is_clsid_supported(const GUID *clsid, const struct msxmlsupported_data_t *table)
static void test_mxattr_dispex(void)
static const ISAXDeclHandlerVtbl SAXDeclHandlerVtbl
static const struct feature_ns_entry_t feature_ns_entry_data[]
static struct call_entry content_handler_test_attributes[]
static const char testXML[]
static ULONG WINAPI contentHandler_Release(ISAXContentHandler *iface)
static HRESULT WINAPI isaxlexical_startEntity(ISAXLexicalHandler *iface, const WCHAR *pName, int nName)
static HRESULT WINAPI isaxlexical_endEntity(ISAXLexicalHandler *iface, const WCHAR *pName, int nName)
static ISAXAttributes * test_attr_ptr
#define cmp(status, error)
static const WCHAR sysW[]
static VARIANTARG static DISPID
#define DISPID_SAX_XMLREADER_GETFEATURE
#define DISPID_SAX_XMLREADER_CONTENTHANDLER
const struct _GUID CLSID_DOMDocument
static const WCHAR utf16W[]
BSTR WINAPI SysAllocString(LPCOLESTR str)
UINT WINAPI SysStringLen(BSTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define DISPATCH_PROPERTYPUT
#define DISPATCH_PROPERTYPUTREF
const GUID IID_IPersistStream
#define IsEqualGUID(rguid1, rguid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
struct attribute_entry * attributes
struct call_entry * sequence
VARIANT_BOOL disable_escape
mxwriter_write_test expected_writes[4]
ISAXDeclHandler ISAXDeclHandler_iface
ISAXLexicalHandler ISAXLexicalHandler_iface
static const WCHAR starW[]
Character const *const prefix
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
static const WCHAR props[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
DWORD WINAPI GetLastError(void)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define DISP_E_UNKNOWNNAME
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList