2 * XMLLite IXmlWriter tests
4 * Copyright 2011 (C) Alistair Leslie-Hughes
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/test.h"
31 static HRESULT (WINAPI
*pCreateXmlWriter
)(REFIID riid
, void **ppvObject
, IMalloc
*pMalloc
);
33 static void test_writer_create(void)
41 pCreateXmlWriter(&IID_IXmlWriter
, NULL
, NULL
);
42 pCreateXmlWriter(NULL
, (LPVOID
*)&writer
, NULL
);
45 hr
= pCreateXmlWriter(&IID_IXmlWriter
, (LPVOID
*)&writer
, NULL
);
46 ok(hr
== S_OK
, "Expected S_OK, got %08x\n", hr
);
49 IXmlWriter_Release(writer
);
53 static BOOL
init_pointers(void)
55 /* don't free module here, it's to be unloaded on exit */
56 HMODULE mod
= LoadLibraryA("xmllite.dll");
60 win_skip("xmllite library not available\n");
64 #define MAKEFUNC(f) if (!(p##f = (void*)GetProcAddress(mod, #f))) return FALSE;
65 MAKEFUNC(CreateXmlWriter
);
75 r
= CoInitialize( NULL
);
76 ok( r
== S_OK
, "failed to init com\n");