oleaut32: Fixed duplicated UUIDs and relevant tests.
[wine.git] / dlls / oleaut32 / tests / tmarshal.idl
blobb130346126e0027d3d418f41538f9cca732c9a50
1 /*
2 * Copyright (C) 2005 Robert Shearman
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
20 #include "tmarshal_dispids.h"
21 import "ocidl.idl";
24 uuid(d96d8a3e-78b6-4c8d-8f27-059db959be8a),
25 version(1.0),
26 helpstring("Test Typelib")
28 library TestTypelib
30 importlib("stdole2.tlb");
32 typedef enum tagSTATE
34 STATE_UNWIDGETIFIED = 1,
35 STATE_WIDGETIFIED
36 } STATE;
38 typedef struct tagMYSTRUCT
40 INT field1;
41 ULONGLONG field2;
42 UINT uarr[8];
43 } MYSTRUCT;
45 coclass ApplicationObject2;
48 odl,
49 uuid(12345678-1234-4321-1234-121212121212)
51 interface ISomethingFromDispatch : IDispatch
53 HRESULT anotherfn(void);
57 odl,
58 oleautomation,
59 dual,
60 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7967)
62 interface ItestDual : IDispatch
64 HRESULT test();
68 odl,
69 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7968)
71 interface ITestSecondIface : IUnknown
73 HRESULT test();
77 odl,
78 oleautomation,
79 dual,
80 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7969)
82 interface ITestSecondDisp : IDispatch
84 HRESULT test();
88 odl,
89 uuid(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586),
90 oleautomation,
91 dual
93 interface IWidget : IDispatch
95 [propput, id(DISPID_TM_NAME)]
96 HRESULT Name([in] BSTR name);
97 [propget, id(DISPID_TM_NAME)]
98 HRESULT Name([out, retval] BSTR *name);
100 [id(DISPID_TM_DOSOMETHING)]
101 HRESULT DoSomething([in] double number, [out] BSTR *str1, [in, defaultvalue("")] BSTR str2, [in, optional] VARIANT *opt);
103 [propget, id(DISPID_TM_STATE)]
104 HRESULT State([out, retval] STATE *state);
105 [propput, id(DISPID_TM_STATE)]
106 HRESULT State([in] STATE state);
108 [id(DISPID_TM_MAP)]
109 HRESULT Map([in] BSTR bstrId, [out, retval] BSTR *sValue);
111 [id(DISPID_TM_SETOLECOLOR)]
112 HRESULT SetOleColor([in] OLE_COLOR val);
114 [id(DISPID_TM_GETOLECOLOR)]
115 HRESULT GetOleColor([out, retval] OLE_COLOR *pVal);
117 [propget, id(DISPID_TM_CLONE)]
118 HRESULT Clone([out, retval] IWidget **ppVal);
120 [propget, id(DISPID_TM_CLONEDISPATCH)]
121 HRESULT CloneDispatch([out, retval] IDispatch **ppVal);
123 [propget, id(DISPID_TM_CLONECOCLASS)]
124 HRESULT CloneCoclass([out, retval] ApplicationObject2 **ppVal);
126 [propget, id(DISPID_VALUE)]
127 HRESULT Value([in] VARIANT *value, [out, retval] VARIANT *retval);
129 [id(DISPID_TM_ARRAY)]
130 HRESULT Array([in] SAFEARRAY(BSTR) values);
132 [id(DISPID_TM_VARARRAYPTR)]
133 HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values);
135 [id(DISPID_TM_VARCARRAY)]
136 HRESULT VariantCArray([in] ULONG count, [in, out] VARIANT values[2]);
138 [id(DISPID_TM_VARIANT)]
139 HRESULT Variant([in] VARIANT var);
141 [vararg, id(DISPID_TM_VARARG)]
142 HRESULT VarArg([in] int numexpect, [in] SAFEARRAY(VARIANT) values);
144 [id(DISPID_TM_STRUCTARGS)]
145 HRESULT StructArgs([in] MYSTRUCT byval, [in] MYSTRUCT *byptr, [in] MYSTRUCT arr[5]);
147 [id(DISPID_TM_ERROR)]
148 HRESULT Error();
150 [propget, id(DISPID_TM_CLONEINTERFACE)]
151 HRESULT CloneInterface([out, retval] ISomethingFromDispatch **ppVal);
153 [id(DISPID_TM_PROP_WITH_LCID), propput]
154 HRESULT prop_with_lcid([in,lcid] long lcid, [in] INT i);
156 [id(DISPID_TM_PROP_WITH_LCID), propget]
157 HRESULT prop_with_lcid([in,lcid] long lcid, [out,retval] INT *i);
159 [id(DISPID_TM_PROP_INT), propget]
160 HRESULT prop_int([out,retval] INT *i);
162 [id(DISPID_TM_PROP_UINT), propget]
163 HRESULT prop_uint([out,retval] UINT *i);
165 [id(DISPID_TM_BYREF_UINT)]
166 HRESULT ByRefUInt([in, out] UINT *i);
168 [id(DISPID_TM_PROP_OPT_ARG), propput]
169 HRESULT prop_opt_arg([in,optional] INT opt, [in] INT i);
171 [id(DISPID_TM_PROP_REQ_ARG), propput]
172 HRESULT prop_req_arg([in] INT req, [in] INT i);
174 [id(DISPID_TM_RESTRICTED), restricted]
175 HRESULT _restrict([out, retval] INT *i);
177 [id(DISPID_TM_NEG_RESTRICTED), restricted]
178 HRESULT neg_restrict([out, retval] INT *i);
182 odl,
183 uuid(a1f8cae3-c947-3c5f-a57c-c88b9b6f3586),
184 oleautomation,
185 dual
187 interface IStaticWidget : IDispatch
189 [id(DISPID_TM_TESTDUAL)]
190 HRESULT TestDual([in] ItestDual *p);
192 [id(DISPID_TM_TESTSECONDIFACE)]
193 HRESULT TestSecondIface([in] ITestSecondIface *p);
197 odl,
198 uuid(a028db05-30f0-4b93-b17a-41c72f831d84),
199 #if 0 /* FIXME: commented out as causes widl to generate incorrect typelib */
200 dual,
201 #endif
202 oleautomation
204 interface IKindaEnumWidget : IUnknown
206 HRESULT Next(
207 [out] IWidget **widget);
209 HRESULT Count(
210 [out] unsigned long *count);
212 HRESULT Reset();
214 HRESULT Clone(
215 [out] IKindaEnumWidget **ppenum);
219 odl,
220 uuid(a028db06-30f0-4b93-b17a-41c72f831d84),
222 interface INonOleAutomation : IUnknown
224 [id(DISPID_NOA_BSTRRET)]
225 BSTR BstrRet();
227 [id(DISPID_NOA_ERROR)]
228 HRESULT Error();
233 dllname("comm.drv"),
234 uuid(d377f60b-8639-4261-8ee7-75c8340d2cc9),
236 module BadModule
239 entry("Foo"),
241 HRESULT BadModuleFoo();
245 dllname("oleaut32.dll"),
246 uuid(d377f60c-8639-4261-8ee7-75c8340d2cc9),
248 module BadEntry
251 entry("Foo"),
253 HRESULT BadEntryFoo();
257 uuid(bb171948-10ec-407a-9a57-2f85f797ff1a),
258 appobject,
260 coclass ApplicationObject2
262 interface IWidget;
263 [source] interface IWidget;
267 odl,
268 uuid(375f8a9d-33d0-44f3-b972-61f8407899e0)
270 interface ItestIF1 : IUnknown
272 HRESULT fn1([in] int x);
273 HRESULT fn2([out,retval] int *x);
277 odl,
278 uuid(094056a3-666f-4956-be12-1859668310b8)
280 interface ItestIF2 : ItestIF1
282 HRESULT fn3([in] int y);
286 odl,
287 uuid(33baba09-2e68-43ab-81fe-d84b403df2e5)
289 dispinterface ItestIF3
291 interface ItestIF2;
295 odl,
296 uuid(a01005c7-7491-42eb-94f3-668e37ce60a6)
298 dispinterface ItestIF4
300 properties:
301 methods:
302 [id(0x1c)] HRESULT fn([in] int z);
306 odl,
307 uuid(4ab61e25-c09f-4239-8f7f-7a018ea0199f),
308 dual
310 interface ItestIF5 : ItestIF2
312 [id(0x1234)] HRESULT fn4([in] int a);
313 [id(0x1235)] HRESULT fn5([in] int a);
317 odl,
318 uuid(ec236d8e-2cc7-44f2-b394-36c86ff3da74)
320 interface ItestIF6 : IDispatch
322 [id(0x1234)] HRESULT fn4([in] int a);
323 [id(0x1235)] HRESULT fn5([in] int a);
327 odl,
328 uuid(f711b105-554d-4751-818c-46fcc5d7c0d5),
329 dual
331 interface ItestIF7 : ItestIF6
333 [id(0x1236)] HRESULT fn6([in] GUID a);
337 odl,
338 uuid(bdfa260b-ef40-43d3-b071-cddec919f132)
340 interface ItestIF8
342 HRESULT fn1([in] int x);
343 HRESULT fn2([out,retval] int *x);
347 odl,
348 uuid(51033a23-dc37-4f19-aa34-4d8a670458a0)
351 interface ItestIF9 : ItestIF8
353 HRESULT fn3([in] int y);
357 odl,
358 uuid(2e8f14fe-0bce-42f0-8b7d-3af8393c7967)
360 dispinterface ItestIF10
362 interface ItestIF9;
366 odl,
367 uuid(7d9e9371-482e-4944-9b19-511fc705236f)
369 dispinterface ItestIF11
371 interface ItestIF7;