Commit fdb9bdc8 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi/tests: Improve COM test.

Test for a class that Wine actually supports, and also make sure our apartment is uninitialized. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarHans Leidekker <hans@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bb2d13b4
......@@ -24,8 +24,7 @@
#include <windef.h>
#include <winbase.h>
#define COBJMACROS
#include <objbase.h>
#include <unknwn.h>
#include <msxml.h>
#include <msi.h>
#include <msiquery.h>
......@@ -248,14 +247,19 @@ UINT WINAPI main_test(MSIHANDLE hinst)
{
UINT res;
IUnknown *unk = NULL;
HRESULT hres;
HRESULT hr;
/* Test for an MTA apartment */
hres = CoCreateInstance(&CLSID_Picture_Metafile, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
todo_wine_ok(hinst, hres == S_OK, "CoCreateInstance failed with %08x\n", hres);
hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
todo_wine_ok(hinst, hr == S_OK, "CoCreateInstance failed with %08x\n", hr);
if (unk) IUnknown_Release(unk);
/* but ours is uninitialized */
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
ok(hinst, hr == S_OK, "got %#x\n", hr);
CoUninitialize();
/* Test MsiGetDatabaseState() */
res = MsiGetDatabaseState(hinst);
todo_wine_ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment