#include <windef.h>
#include <winbase.h>
+#include <winnls.h>
#include <objbase.h>
#include <ole2.h>
#include <xmllite.h>
IMalloc *imalloc,
LPCWSTR encoding_name,
IXmlWriterOutput **output);
+static HRESULT (WINAPI *pCreateXmlWriterOutputWithEncodingCodePage)(IUnknown *stream,
+ IMalloc *imalloc,
+ UINT codepage,
+ IXmlWriterOutput **output);
static HRESULT WINAPI testoutput_QueryInterface(IUnknown *iface, REFIID riid, void **obj)
{
#define MAKEFUNC(f) if (!(p##f = (void*)GetProcAddress(mod, #f))) return FALSE;
MAKEFUNC(CreateXmlWriter);
MAKEFUNC(CreateXmlWriterOutputWithEncodingName);
+ MAKEFUNC(CreateXmlWriterOutputWithEncodingCodePage);
#undef MAKEFUNC
return TRUE;
ok(unk != NULL, "got %p\n", unk);
/* releasing 'unk' crashes on native */
IUnknown_Release(output);
+
+ output = NULL;
+ hr = pCreateXmlWriterOutputWithEncodingCodePage(&testoutput, NULL, ~0u, &output);
+ ok(hr == S_OK, "got %08x\n", hr);
+ IUnknown_Release(output);
+
+ hr = pCreateXmlWriterOutputWithEncodingCodePage(&testoutput, NULL, CP_UTF8, &output);
+ ok(hr == S_OK, "got %08x\n", hr);
+ unk = NULL;
+ hr = IUnknown_QueryInterface(output, &IID_IXmlWriterOutput, (void**)&unk);
+ ok(hr == S_OK, "got %08x\n", hr);
+ ok(unk != NULL, "got %p\n", unk);
+ /* releasing 'unk' crashes on native */
+ IUnknown_Release(output);
}
static void test_writestartdocument(void)