38 #include "wine/list.h" 43 DEFINE_GUID(IID_IXmlWriterOutput, 0xc1131708, 0x0f59, 0x477f, 0x93, 0x59, 0x7d, 0x33, 0x24, 0x51, 0xbc, 0x1a);
49 static const WCHAR xmlnsuriW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'w',
'3',
'.',
'o',
'r',
'g',
'/',
'2',
'0',
'0',
'0',
'/',
'x',
'm',
'l',
'n',
's',
'/',0};
134 static const char *
const prop_names[] =
139 "OmitXmlDeclaration",
146 return prop_names[prop];
193 static const WCHAR colonW[] = {
':',0};
369 unsigned int len = 1;
392 unsigned int len = 0;
414 const int initial_len = 0x2000;
419 WARN(
"Failed to get code page for specified encoding.\n");
425 buffer->allocated = initial_len;
450 buffer->allocated = grown_size;
463 if (
buffer->codepage == 1200) {
511 assert(prefix_len >= 0 && local_len >= 0);
516 if (prefix_len && local_len)
526 if (writeroutput->
stream) {
527 ISequentialStream_Release(writeroutput->
stream);
537 hr = IUnknown_QueryInterface(writeroutput->
output, &IID_IStream, (
void**)&writeroutput->
stream);
539 hr = IUnknown_QueryInterface(writeroutput->
output, &IID_ISequentialStream, (
void**)&writeroutput->
stream);
550 if (!output || !output->
stream)
560 WARN(
"write to stream failed (0x%08x)\n",
hr);
567 }
while (
buffer->written > 0);
577 static const char utf16bom[] = {0xff, 0xfe};
602 static const WCHAR versionW[] = {
'<',
'?',
'x',
'm',
'l',
' ',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'=',
'"',
'1',
'.',
'0',
'"'};
603 static const WCHAR encodingW[] = {
' ',
'e',
'n',
'c',
'o',
'd',
'i',
'n',
'g',
'='};
620 static const WCHAR standaloneW[] = {
' ',
's',
't',
'a',
'n',
'd',
'a',
'l',
'o',
'n',
'e',
'=',
'\"'};
621 static const WCHAR yesW[] = {
'y',
'e',
's',
'\"',
'?',
'>'};
622 static const WCHAR noW[] = {
'n',
'o',
'\"',
'?',
'>'};
674 static const WCHAR dblspaceW[] = {
' ',
' '};
688 while (indent_level--)
712 IXmlWriter_AddRef(iface);
736 if (
This->output) IUnknown_Release(&
This->output->IXmlWriterOutput_iface);
741 if (imalloc) IMalloc_Release(imalloc);
758 IUnknown_Release(&
This->output->IXmlWriterOutput_iface);
760 This->bomwritten = 0;
762 This->indent_level = 0;
773 hr = IUnknown_QueryInterface(output, &IID_IXmlWriterOutput, (
void**)&writeroutput);
778 ERR(
"got external IXmlWriterOutput implementation: %p, vtbl=%p\n",
779 writeroutput, writeroutput->lpVtbl);
780 IUnknown_Release(writeroutput);
785 if (
hr !=
S_OK || !writeroutput) {
855 BOOL fWriteDefaultAttributes)
859 FIXME(
"%p %p %d\n",
This, pReader, fWriteDefaultAttributes);
875 static const WCHAR preserveW[] = {
'p',
'r',
'e',
's',
'e',
'r',
'v',
'e',0};
876 static const WCHAR defaultW[] = {
'd',
'e',
'f',
'a',
'u',
'l',
't',0};
887 static const WCHAR spaceattrW[] = {
's',
'p',
'a',
'c',
'e',0};
888 static const WCHAR xmlnsW[] = {
'x',
'm',
'l',
'n',
's',0};
889 static const WCHAR xmlW[] = {
'x',
'm',
'l',0};
891 BOOL is_xmlns_prefix, is_xmlns_local;
978 FIXME(
"Prefix autogeneration is not implemented.\n");
995 static const WCHAR cdataopenW[] = {
'<',
'!',
'[',
'C',
'D',
'A',
'T',
'A',
'['};
996 static const WCHAR cdatacloseW[] = {
']',
']',
'>'};
1010 switch (
This->state)
1033 static const WCHAR cdatacloseW[] = {
']',
']',
'>',0};
1054 static const WCHAR fmtW[] = {
'&',
'#',
'x',
'%',
'x',
';',0};
1060 switch (
This->state)
1087 switch (
This->state)
1105 static const WCHAR copenW[] = {
'<',
'!',
'-',
'-'};
1106 static const WCHAR ccloseW[] = {
'-',
'-',
'>'};
1111 switch (
This->state)
1134 for (
i = 0;
i <
len;
i++) {
1154 static const WCHAR doctypeW[] = {
'<',
'!',
'D',
'O',
'C',
'T',
'Y',
'P',
'E',
' '};
1155 static const WCHAR publicW[] = {
' ',
'P',
'U',
'B',
'L',
'I',
'C',
' '};
1156 static const WCHAR systemW[] = {
' ',
'S',
'Y',
'S',
'T',
'E',
'M',
' '};
1158 unsigned int name_len, pubid_len;
1164 switch (
This->state)
1227 switch (
This->state)
1303 switch (
This->state)
1318 while (IXmlWriter_WriteEndElement(iface) ==
S_OK)
1332 switch (
This->state)
1352 if (
This->starttagopen)
1356 This->starttagopen = 0;
1377 switch (
This->state)
1399 switch (
This->state)
1447 switch (
This->state)
1470 switch (
This->state)
1488 BOOL fWriteDefaultAttributes)
1492 FIXME(
"%p %p %d\n",
This, pReader, fWriteDefaultAttributes);
1498 BOOL fWriteDefaultAttributes)
1502 FIXME(
"%p %p %d\n",
This, pReader, fWriteDefaultAttributes);
1511 static const WCHAR xmlW[] = {
'x',
'm',
'l',0};
1512 static const WCHAR openpiW[] = {
'<',
'?'};
1516 switch (
This->state)
1554 switch (
This->state)
1578 switch (
This->state)
1605 switch (
This->state)
1624 TRACE(
"(%p)->(%d)\n",
This, standalone);
1626 switch (
This->state)
1648 int prefix_len, local_len;
1658 switch (
This->state)
1699 This->starttagopen = 1;
1718 static const WCHAR ampW[] = {
'&',
'a',
'm',
'p',
';'};
1719 static const WCHAR ltW[] = {
'&',
'l',
't',
';'};
1720 static const WCHAR gtW[] = {
'&',
'g',
't',
';'};
1752 switch (
This->state)
1778 FIXME(
"%p %d %d\n",
This, wchLow, wchHigh);
1856 IUnknown_AddRef(iface);
1879 if (
This->output) IUnknown_Release(
This->output);
1880 if (
This->stream) ISequentialStream_Release(
This->stream);
1884 if (imalloc) IMalloc_Release(imalloc);
1905 writer = IMalloc_Alloc(imalloc,
sizeof(*writer));
1911 memset(writer, 0,
sizeof(*writer));
1916 if (imalloc) IMalloc_AddRef(imalloc);
1925 TRACE(
"returning iface %p, hr %#x\n", *
obj,
hr);
1939 writeroutput = IMalloc_Alloc(imalloc,
sizeof(*writeroutput));
1941 writeroutput =
heap_alloc(
sizeof(*writeroutput));
1946 writeroutput->
ref = 1;
1947 writeroutput->
imalloc = imalloc;
1949 IMalloc_AddRef(imalloc);
1958 if (encoding_name) {
1969 *
out = writeroutput;
1971 TRACE(
"Created writer output %p\n", *
out);
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 * u
static const WCHAR xmlnsuriW[]
HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IMalloc *imalloc, const WCHAR *encoding, IXmlWriterOutput **out)
static void * writer_alloc(const xmlwriter *writer, size_t len)
static HRESULT WINAPI xmlwriter_WriteElementString(IXmlWriter *iface, LPCWSTR prefix, LPCWSTR local_name, LPCWSTR uri, LPCWSTR value)
static struct ns * writer_find_ns(const xmlwriter *writer, const WCHAR *prefix, const WCHAR *uri)
static HRESULT WINAPI xmlwriter_WriteSurrogateCharEntity(IXmlWriter *iface, WCHAR wchLow, WCHAR wchHigh)
static void writer_dec_indent(xmlwriter *writer)
#define WideCharToMultiByte
static void writer_inc_indent(xmlwriter *writer)
static struct ns * writer_find_ns_current(const xmlwriter *writer, const WCHAR *prefix, const WCHAR *uri)
static HRESULT WINAPI xmlwriter_SetOutput(IXmlWriter *iface, IUnknown *output)
static ULONG WINAPI xmlwriter_Release(IXmlWriter *iface)
static HRESULT writer_close_starttag(xmlwriter *writer)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
static HRESULT WINAPI xmlwriter_SetProperty(IXmlWriter *iface, UINT property, LONG_PTR value)
char * wine_dbgstr_w(const wchar_t *wstr)
static const struct IUnknownVtbl xmlwriteroutputvtbl
static void * writeroutput_alloc(xmlwriteroutput *output, size_t len)
static BOOL is_empty_string(const WCHAR *str)
static const WCHAR defaultW[]
BOOL is_pubchar(WCHAR ch)
static HRESULT WINAPI xmlwriter_WriteQualifiedName(IXmlWriter *iface, LPCWSTR pwszLocalName, LPCWSTR pwszNamespaceUri)
static const WCHAR closeelementW[]
static struct ns * writer_push_ns(xmlwriter *writer, const WCHAR *prefix, int prefix_len, const WCHAR *uri)
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
static struct element * pop_element(xmlwriter *writer)
const char * wine_dbgstr_guid(const GUID *guid)
static const WCHAR * get_output_encoding_name(xmlwriteroutput *output)
static HRESULT WINAPI xmlwriter_WriteFullEndElement(IXmlWriter *iface)
static void writer_free(const xmlwriter *writer, void *mem)
#define comment(fmt, arg1)
static void * writeroutput_realloc(xmlwriteroutput *output, void *mem, size_t len)
static const WCHAR utf16bom
static HRESULT is_valid_pubid(const WCHAR *str, unsigned int *out)
static void * heap_alloc(size_t len)
WINE_DEFAULT_DEBUG_CHANNEL(richedit)
static HRESULT write_output_buffer_char(xmlwriteroutput *output, WCHAR ch)
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
const char * wine_dbg_sprintf(const char *format,...)
static const WCHAR crlfW[]
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
static const WCHAR xmlnsW[]
static HRESULT WINAPI xmlwriter_WriteAttributes(IXmlWriter *iface, IXmlReader *pReader, BOOL fWriteDefaultAttributes)
static HRESULT WINAPI xmlwriter_WriteAttributeString(IXmlWriter *iface, LPCWSTR prefix, LPCWSTR local, LPCWSTR uri, LPCWSTR value)
static void writeroutput_free(xmlwriteroutput *output, void *mem)
GLenum GLuint GLenum GLsizei length
struct output_buffer buffer
static HRESULT writeroutput_query_for_stream(xmlwriteroutput *writeroutput)
static const WCHAR yesW[]
static const WCHAR xmlW[]
static HRESULT WINAPI xmlwriter_WriteStartElement(IXmlWriter *iface, LPCWSTR prefix, LPCWSTR local_name, LPCWSTR uri)
static const char * debugstr_writer_prop(XmlWriterProperty prop)
static HRESULT WINAPI xmlwriter_WriteEntityRef(IXmlWriter *iface, LPCWSTR pwszName)
static ULONG WINAPI xmlwriter_AddRef(IXmlWriter *iface)
struct _xmlwriter xmlwriter
BOOL is_namechar(WCHAR ch)
static HRESULT WINAPI xmlwriter_WriteStartDocument(IXmlWriter *iface, XmlStandalone standalone)
static HRESULT WINAPI xmlwriter_WriteRawChars(IXmlWriter *iface, const WCHAR *pwch, UINT cwch)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
static void writer_output_ns(xmlwriter *writer, struct element *element)
static HRESULT WINAPI xmlwriter_WriteCData(IXmlWriter *iface, LPCWSTR data)
static HRESULT WINAPI xmlwriter_WriteWhitespace(IXmlWriter *iface, LPCWSTR pwszWhitespace)
static void write_cdata_section(xmlwriteroutput *output, const WCHAR *data, int len)
static HRESULT WINAPI xmlwriter_WriteCharEntity(IXmlWriter *iface, WCHAR ch)
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
static void * m_alloc(IMalloc *imalloc, size_t len)
static xmlwriteroutput * impl_from_IXmlWriterOutput(IXmlWriterOutput *iface)
static HRESULT WINAPI xmlwriter_WriteComment(IXmlWriter *iface, LPCWSTR comment)
static HRESULT get_code_page(xml_encoding encoding, UINT *cp)
static xml_encoding parse_encoding_name(const WCHAR *encoding)
static const WCHAR closepiW[]
static HRESULT is_valid_ncname(const WCHAR *str, int *out)
static BOOL is_valid_xml_space_value(const WCHAR *value)
static WCHAR * writer_strdupW(const xmlwriter *writer, const WCHAR *str)
static HRESULT write_encoding_bom(xmlwriter *writer)
static void writer_free_element_stack(xmlwriter *writer)
static HRESULT WINAPI xmlwriter_GetProperty(IXmlWriter *iface, UINT property, LONG_PTR *value)
static HRESULT WINAPI xmlwriter_WriteProcessingInstruction(IXmlWriter *iface, LPCWSTR name, LPCWSTR text)
HRESULT WINAPI CreateXmlWriterOutputWithEncodingCodePage(IUnknown *stream, IMalloc *imalloc, UINT codepage, IXmlWriterOutput **out)
static HRESULT grow_output_buffer(xmlwriteroutput *output, int length)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static HRESULT WINAPI xmlwriter_WriteDocType(IXmlWriter *iface, LPCWSTR name, LPCWSTR pubid, LPCWSTR sysid, LPCWSTR subset)
BOOL is_ncnamechar(WCHAR ch)
static void free_output_buffer(xmlwriteroutput *output)
static void * m_realloc(IMalloc *imalloc, void *mem, size_t len)
static HRESULT write_output_buffer(xmlwriteroutput *output, const WCHAR *data, int len)
#define InterlockedDecrement
static HRESULT WINAPI xmlwriter_WriteNodeShallow(IXmlWriter *iface, IXmlReader *pReader, BOOL fWriteDefaultAttributes)
static HRESULT write_xmldecl(xmlwriter *writer, XmlStandalone standalone)
#define memcpy(s1, s2, n)
REFIID LPVOID * ppvObject
GLsizei const GLfloat * value
static HRESULT write_output_qname(xmlwriteroutput *output, const WCHAR *prefix, int prefix_len, const WCHAR *local_name, int local_len)
int _cdecl swprintf(const WCHAR *,...)
IXmlWriterOutput IXmlWriterOutput_iface
static HRESULT WINAPI xmlwriter_WriteEndElement(IXmlWriter *iface)
xml_encoding get_encoding_from_codepage(UINT codepage)
static void m_free(IMalloc *imalloc, void *mem)
static xmlwriter * impl_from_IXmlWriter(IXmlWriter *iface)
static HRESULT write_output_buffer_quoted(xmlwriteroutput *output, const WCHAR *data, int len)
static void writer_push_element(xmlwriter *writer, struct element *element)
static const WCHAR publicW[]
static HRESULT writeroutput_flush_stream(xmlwriteroutput *output)
static void write_escaped_string(xmlwriter *writer, const WCHAR *string)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static const WCHAR closetagW[]
static HRESULT is_valid_name(const WCHAR *str, unsigned int *out)
const WCHAR * get_encoding_name(xml_encoding encoding)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
#define InterlockedIncrement
static const struct IXmlWriterVtbl xmlwriter_vtbl
static void write_output_attribute(xmlwriter *writer, const WCHAR *prefix, int prefix_len, const WCHAR *local, int local_len, const WCHAR *value)
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
static HRESULT init_output_buffer(xmlwriteroutput *output)
static void writer_free_element(xmlwriter *writer, struct element *element)
static void write_node_indent(xmlwriter *writer)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
static HRESULT WINAPI xmlwriteroutput_QueryInterface(IXmlWriterOutput *iface, REFIID riid, void **ppvObject)
ISequentialStream * stream
static HRESULT WINAPI xmlwriter_WriteName(IXmlWriter *iface, LPCWSTR pwszName)
static ULONG WINAPI xmlwriteroutput_Release(IXmlWriterOutput *iface)
HRESULT WINAPI CreateXmlWriter(REFIID riid, void **obj, IMalloc *imalloc)
static HRESULT WINAPI xmlwriter_QueryInterface(IXmlWriter *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI xmlwriter_WriteNode(IXmlWriter *iface, IXmlReader *pReader, BOOL fWriteDefaultAttributes)
static HRESULT WINAPI xmlwriter_WriteNmToken(IXmlWriter *iface, LPCWSTR pwszNmToken)
static HRESULT WINAPI xmlwriter_WriteChars(IXmlWriter *iface, const WCHAR *pwch, UINT cwch)
static HRESULT WINAPI xmlwriter_WriteEndDocument(IXmlWriter *iface)
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
static const WCHAR systemW[]
static HRESULT create_writer_output(IUnknown *stream, IMalloc *imalloc, xml_encoding encoding, const WCHAR *encoding_name, xmlwriteroutput **out)
static void writeroutput_release_stream(xmlwriteroutput *writeroutput)
static ULONG WINAPI xmlwriteroutput_AddRef(IXmlWriterOutput *iface)
unsigned int indent_level
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
static HRESULT WINAPI xmlwriter_Flush(IXmlWriter *iface)
static HRESULT WINAPI xmlwriter_WriteRaw(IXmlWriter *iface, LPCWSTR data)
BOOL is_namestartchar(WCHAR ch)
XmlConformanceLevel conformance
static const WCHAR versionW[]
static BSTR local_name(call_frame_t *frame, int ref)
IXmlWriter IXmlWriter_iface
static struct element * alloc_element(xmlwriter *writer, const WCHAR *prefix, const WCHAR *local)
static HRESULT WINAPI xmlwriter_WriteString(IXmlWriter *iface, const WCHAR *string)
DEFINE_GUID(IID_IXmlWriterOutput, 0xc1131708, 0x0f59, 0x477f, 0x93, 0x59, 0x7d, 0x33, 0x24, 0x51, 0xbc, 0x1a)
static WCHAR * writer_strndupW(const xmlwriter *writer, const WCHAR *str, int len)