wshom.ocx: Added beginning WshShell object tests.
[wine/multimedia.git] / dlls / wshom.ocx / tests / wshom.c
blobf9768b9d27eed6d3c39d31e71ed140b544250b4a
1 /*
2 * Copyright 2011 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #define COBJMACROS
20 #define CONST_VTABLE
22 #include <initguid.h>
23 #include <ole2.h>
24 #include <dispex.h>
26 #include "wine/test.h"
28 DEFINE_GUID(CLSID_WshShell, 0x72c24dd5, 0xd70a, 0x438b, 0x8a,0x42, 0x98,0x42,0x4b,0x88,0xaf,0xb8);
30 DEFINE_GUID(IID_IWshShell3, 0x41904400, 0xbe18, 0x11d3, 0xa2,0x8b, 0x00,0x10,0x4b,0xd3,0x50,0x90);
32 static void test_wshshell(void)
34 IDispatch *disp;
35 IUnknown *shell;
36 HRESULT hres;
38 hres = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
39 &IID_IDispatch, (void**)&disp);
40 if(FAILED(hres)) {
41 win_skip("Could not create WshShell object: %08x\n", hres);
42 return;
45 hres = IDispatch_QueryInterface(disp, &IID_IWshShell3, (void**)&shell);
46 IDispatch_Release(disp);
47 ok(hres == S_OK, "Could not get IWshShell3 iface: %08x\n", hres);
49 IUnknown_Release(shell);
52 START_TEST(wshom)
54 CoInitialize(NULL);
56 test_wshshell();
58 CoUninitialize();