1/*
2 * ITypeLib test IDL - we dump it and compare results in typelib.c
3 *
4 * Copyright 2007 Google (Mikolaj Zalewski)
5 * Copyright 2006,2015 Dmitry Timoshkov
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#pragma makedep ident
23#pragma makedep typelib
24
25import "oaidl.idl"; /* needed by widl */
26
27midl_pragma warning ( disable : 2368 )
28
29[uuid(8b05fe77-4a6c-4133-b9cd-8f81747af784)]
30library Test
31{
32	importlib("stdole2.tlb");
33
34	typedef [uuid(b14b6bb5-904e-4ff9-b247-bd361f7a0001)]
35	struct g { int g1; } g;
36
37	[uuid(b14b6bb5-904e-4ff9-b247-bd361f7a0002)]
38	interface test_iface : IUnknown
39	{
40		HRESULT test([in] g *ptr);
41	}
42
43	interface child_iface;
44	interface parent_iface;
45
46	[uuid(b14b6bb5-904e-4ff9-b247-bd361f7aa001)]
47	interface parent_iface : IUnknown
48	{
49		HRESULT test1([out,retval] child_iface **iface);
50	}
51	[uuid(b14b6bb5-904e-4ff9-b247-bd361f7aa002)]
52	interface child_iface: parent_iface
53	{
54		HRESULT test2(void);
55	}
56
57	[uuid(016fe2ec-b2c8-45f8-b23b-39e53a753901),restricted]
58	struct _n { int n1; };
59	[uuid(016fe2ec-b2c8-45f8-b23b-39e53a753902),hidden]
60	typedef struct _n n;
61	[uuid(016fe2ec-b2c8-45f8-b23b-39e53a753903),version(1.2),helpcontext(3)]
62	typedef struct _n nn;
63
64	[uuid(016fe2ec-b2c8-45f8-b23b-39e53a753904),restricted]
65	struct _m { int m1; };
66	[uuid(016fe2ec-b2c8-45f8-b23b-39e53a753905),hidden,version(1.2)]
67	typedef struct _m m;
68	[uuid(016fe2ec-b2c8-45f8-b23b-39e53a753906),helpcontext(3)]
69	typedef struct _m mm;
70
71	[dual,uuid(b14b6bb5-904e-4ff9-b247-bd361f7aaedd)]
72	interface IDualIface : IDispatch
73	{
74		HRESULT test();
75	}
76
77	[uuid(ec5dfcd6-eeb0-4cd6-b51e-8030e1dac009)]
78	interface ISimpleIface : IDispatch
79	{
80		HRESULT test();
81	}
82
83	[uuid(4029f190-ca4a-4611-aeb9-673983cb96dd)]
84	struct test_struct
85	{
86		HRESULT hr;
87		VARIANT_BOOL b;
88		IDispatch *disp;
89		BSTR bstr;
90	};
91
92        /* identical to 'test_struct', only guid is different */
93	[uuid(4029f190-ca4a-4611-aeb9-673983cb96de)]
94	struct test_struct2
95	{
96		HRESULT hr;
97		VARIANT_BOOL b;
98		IDispatch *disp;
99		BSTR bstr;
100	};
101
102	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a75396a),restricted]
103	int t_INT;
104
105	typedef [public] enum _a { a1, a2 } a;
106	typedef [public] enum aa { aa1, aa2 } aa;
107	typedef enum _b { b1, b2 } b;
108	typedef enum bb { bb1, bb2 } bb;
109	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a75396b)] enum _c { c1, c2 } c;
110	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a75396c)] enum cc { cc1, cc2 } cc;
111
112	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a75396d),restricted,hidden]
113	enum _d { d1, d2 } d;
114	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a75396e),restricted,hidden]
115	enum dd { dd1, dd2 } dd;
116
117	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a753970),restricted,hidden]
118	struct _e { int e1; } e;
119	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a753971),restricted,hidden]
120	struct ee { int ee1; } ee;
121
122	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a753972),restricted,hidden]
123	union _f { int f1; BSTR *f2; } f;
124	typedef [uuid(016fe2ec-b2c8-45f8-b23b-39e53a753973),restricted,hidden]
125	union ff { int ff1; BSTR *ff2; } ff;
126
127	[uuid(ec5dfcd6-eeb0-4cd6-b51e-8030e1dac00a)]
128	interface ITestIface : IDispatch
129	{
130		HRESULT test1(a value);
131		HRESULT test2(b value);
132		HRESULT test3(c value);
133		HRESULT test4(d value);
134		HRESULT test5(e value);
135		HRESULT test6(f value);
136	}
137}
138