advapi32: Create MachineGuid value if it doesn't exist.
[wine] / dlls / jscript / tests / jscript.c
1 /*
2  * Copyright 2008 Jacek Caban for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #define COBJMACROS
20
21 #include <initguid.h>
22
23 #include <ole2.h>
24 #include <activscp.h>
25
26 #include "wine/test.h"
27
28 static const CLSID CLSID_JScript =
29     {0xf414c260,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}};
30
31 static void test_jscript(void)
32 {
33     IActiveScriptParse *parse;
34     IActiveScript *script;
35     IUnknown *unk;
36     HRESULT hres;
37
38     hres = CoCreateInstance(&CLSID_JScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
39             &IID_IUnknown, (void**)&unk);
40     ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
41     if(FAILED(hres))
42         return;
43
44     hres = IUnknown_QueryInterface(unk, &IID_IActiveScript, (void**)&script);
45     ok(hres == S_OK, "Could not get IActiveScript: %08x\n", hres);
46
47     hres = IUnknown_QueryInterface(unk, &IID_IActiveScriptParse, (void**)&parse);
48     ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres);
49
50     IActiveScriptParse_Release(parse);
51     IActiveScript_Release(script);
52     IUnknown_Release(unk);
53 }
54
55 START_TEST(jscript)
56 {
57     CoInitialize(NULL);
58
59     test_jscript();
60
61     CoUninitialize();
62 }