X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=rostests%2Fwinetests%2Fxmllite%2Fwriter.c;h=4ca8b644f4dfdccc4aba3da68a99c1d115787fd7;hp=04d25d54755ed73ef6b7215ddf70978f5e1a6bf3;hb=493f7ff217607140ef5b517f8e851f9116279966;hpb=b9cb1aabf17bd279f10c8b52c293bd9e3d219565 diff --git a/rostests/winetests/xmllite/writer.c b/rostests/winetests/xmllite/writer.c index 04d25d54755..4ca8b644f4d 100644 --- a/rostests/winetests/xmllite/writer.c +++ b/rostests/winetests/xmllite/writer.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -43,6 +44,10 @@ static HRESULT (WINAPI *pCreateXmlWriterOutputWithEncodingName)(IUnknown *stream 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) { @@ -175,6 +180,7 @@ static BOOL init_pointers(void) #define MAKEFUNC(f) if (!(p##f = (void*)GetProcAddress(mod, #f))) return FALSE; MAKEFUNC(CreateXmlWriter); MAKEFUNC(CreateXmlWriterOutputWithEncodingName); + MAKEFUNC(CreateXmlWriterOutputWithEncodingCodePage); #undef MAKEFUNC return TRUE; @@ -200,6 +206,20 @@ static void test_writeroutput(void) 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)