winex11.drv: Support multiple adapter display settings in registry.
[wine.git] / dlls / oleaut32 / tests / tmarshal.idl
bloba594f9137d809d390f99253093f8b423d8cae9e7
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 #pragma makedep ident
21 #pragma makedep typelib
23 import "ocidl.idl";
25 enum IWidget_dispids
27 DISPID_TM_NAME = 1,
28 DISPID_TM_DOSOMETHING,
29 DISPID_TM_STATE,
30 DISPID_TM_MAP,
31 DISPID_TM_SETOLECOLOR,
32 DISPID_TM_GETOLECOLOR,
33 DISPID_TM_CLONE,
34 DISPID_TM_CLONEDISPATCH,
35 DISPID_TM_CLONECOCLASS,
36 DISPID_TM_VALUE,
37 DISPID_TM_VARARRAYPTR,
38 DISPID_TM_VARARG,
39 DISPID_TM_ERROR,
40 DISPID_TM_CLONEINTERFACE,
41 DISPID_TM_TESTDUAL,
42 DISPID_TM_PROP_WITH_LCID,
43 DISPID_TM_PROP_INT,
44 DISPID_TM_PROP_UINT,
45 DISPID_TM_BYREF_UINT,
46 DISPID_TM_PROP_OPT_ARG,
47 DISPID_TM_PROP_REQ_ARG,
48 DISPID_TM_RESTRICTED,
49 DISPID_TM_TESTSECONDIFACE,
50 DISPID_TM_VARARG_RUN,
51 DISPID_TM_VARARG_REF_RUN,
53 DISPID_TM_BASETYPES_IN,
54 DISPID_TM_BASETYPES_OUT,
55 DISPID_TM_FLOAT_ABI,
56 DISPID_TM_INT_PTR,
57 DISPID_TM_INT_PTR_PTR,
58 DISPID_TM_IFACE_IN,
59 DISPID_TM_IFACE_OUT,
60 DISPID_TM_IFACE_PTR,
61 DISPID_TM_IFACE_NOPTR,
62 DISPID_TM_BSTR,
63 DISPID_TM_VARIANT,
64 DISPID_TM_SAFEARRAY,
65 DISPID_TM_STRUCT,
66 DISPID_TM_STRUCT_PTR_PTR,
67 DISPID_TM_THIN_STRUCT,
68 DISPID_TM_RECT,
69 DISPID_TM_COMPLEX_STRUCT,
70 DISPID_TM_ARRAY,
71 DISPID_TM_VARIANT_ARRAY,
72 DISPID_TM_STRUCT_ARRAY,
73 DISPID_TM_TYPEDEF,
74 DISPID_TM_COCLASS,
75 DISPID_TM_COCLASS_PTR,
76 DISPID_TM_COCLASS_NOPTR,
77 DISPID_TM_NOINOUT
80 static const int DISPID_TM_NEG_RESTRICTED = -26;
82 enum INonOleAutomation_dispids
84 DISPID_NOA_BSTRRET = 1,
85 DISPID_NOA_ERROR
89 uuid(d96d8a3e-78b6-4c8d-8f27-059db959be8a),
90 version(2.5),
91 helpstring("Test Typelib")
93 library TestTypelib
95 importlib("stdole2.tlb");
97 typedef enum tagSTATE
99 STATE_UNWIDGETIFIED = 1,
100 STATE_WIDGETIFIED
101 } STATE;
103 typedef struct tagMYSTRUCT
105 INT field1;
106 ULONGLONG field2;
107 UINT uarr[8];
108 } MYSTRUCT;
110 typedef [public] int myint_t;
112 typedef int array_t[4];
114 coclass ApplicationObject2;
117 odl,
118 oleautomation,
119 uuid(12345678-1234-4321-1234-121212121212)
121 interface ISomethingFromDispatch : IDispatch
123 HRESULT anotherfn(void);
127 odl,
128 oleautomation,
129 dual,
130 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7967)
132 interface ItestDual : IDispatch
134 HRESULT test();
138 odl,
139 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7968)
141 interface ITestSecondIface : IUnknown
143 HRESULT test();
147 odl,
148 oleautomation,
149 dual,
150 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7969)
152 interface ITestSecondDisp : IDispatch
154 HRESULT test();
158 oleautomation,
159 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796a)
161 interface ICoclass1 : IDispatch
163 HRESULT test();
167 oleautomation,
168 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796b)
170 interface ICoclass2 : IDispatch
172 HRESULT test();
175 cpp_quote("struct Coclass1 { ICoclass1 *iface; };")
176 cpp_quote("struct Coclass2 { ICoclass2 *iface; };")
177 cpp_quote("struct Coclass3 { ICoclass1 *iface; };")
180 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796c)
182 coclass Coclass1
184 [default] interface ICoclass1;
185 interface ICoclass2;
189 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796d)
191 coclass Coclass2
193 interface ICoclass1;
194 [default] interface ICoclass2;
198 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796e)
200 coclass Coclass3
202 interface ICoclass1;
203 interface ICoclass2;
207 odl,
208 uuid(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586),
209 oleautomation,
210 dual
212 interface IWidget : IDispatch
214 [propput, id(DISPID_TM_NAME)]
215 HRESULT Name([in] BSTR name);
216 [propget, id(DISPID_TM_NAME)]
217 HRESULT Name([out, retval] BSTR *name);
219 [id(DISPID_TM_DOSOMETHING)]
220 HRESULT DoSomething([in] double number, [out] BSTR *str1, [in, defaultvalue("")] BSTR str2, [in, optional] VARIANT *opt);
222 [propget, id(DISPID_TM_STATE)]
223 HRESULT State([out, retval] STATE *state);
224 [propput, id(DISPID_TM_STATE)]
225 HRESULT State([in] STATE state);
227 [id(DISPID_TM_MAP)]
228 HRESULT Map([in] BSTR bstrId, [out, retval] BSTR *sValue);
230 [id(DISPID_TM_SETOLECOLOR)]
231 HRESULT SetOleColor([in] OLE_COLOR val);
233 [id(DISPID_TM_GETOLECOLOR)]
234 HRESULT GetOleColor([out, retval] OLE_COLOR *pVal);
236 [propget, id(DISPID_TM_CLONE)]
237 HRESULT Clone([out, retval] IWidget **ppVal);
239 [propget, id(DISPID_TM_CLONEDISPATCH)]
240 HRESULT CloneDispatch([out, retval] IDispatch **ppVal);
242 [propget, id(DISPID_TM_CLONECOCLASS)]
243 HRESULT CloneCoclass([out, retval] ApplicationObject2 **ppVal);
245 [propget, id(DISPID_VALUE)]
246 HRESULT Value([in] VARIANT *value, [out, retval] VARIANT *retval);
248 [id(DISPID_TM_VARARRAYPTR)]
249 HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values);
251 [vararg, id(DISPID_TM_VARARG)]
252 HRESULT VarArg([in] int numexpect, [in] SAFEARRAY(VARIANT) values);
254 [id(DISPID_TM_ERROR)]
255 HRESULT Error();
257 [propget, id(DISPID_TM_CLONEINTERFACE)]
258 HRESULT CloneInterface([out, retval] ISomethingFromDispatch **ppVal);
260 [id(DISPID_TM_PROP_WITH_LCID), propput]
261 HRESULT prop_with_lcid([in,lcid] long lcid, [in] INT i);
263 [id(DISPID_TM_PROP_WITH_LCID), propget]
264 HRESULT prop_with_lcid([in,lcid] long lcid, [out,retval] INT *i);
266 [id(DISPID_TM_PROP_INT), propget]
267 HRESULT prop_int([out,retval] INT *i);
269 [id(DISPID_TM_PROP_UINT), propget]
270 HRESULT prop_uint([out,retval] UINT *i);
272 [id(DISPID_TM_BYREF_UINT)]
273 HRESULT ByRefUInt([in, out] UINT *i);
275 [id(DISPID_TM_PROP_OPT_ARG), propput]
276 HRESULT prop_opt_arg([in,optional] INT opt, [in] INT i);
278 [id(DISPID_TM_PROP_REQ_ARG), propput]
279 HRESULT prop_req_arg([in] INT req, [in] INT i);
281 [id(DISPID_TM_RESTRICTED), restricted]
282 HRESULT pos_restrict([out, retval] INT *i);
284 [id(DISPID_TM_NEG_RESTRICTED), restricted]
285 HRESULT neg_restrict([out, retval] INT *i);
287 [id(DISPID_TM_VARARG_RUN), vararg]
288 HRESULT VarArg_Run([in] BSTR name, [in] SAFEARRAY(VARIANT) params, [out, retval] VARIANT *result);
290 [id(DISPID_TM_VARARG_REF_RUN), vararg]
291 HRESULT VarArg_Ref_Run([in] BSTR name, [in] SAFEARRAY(VARIANT) *params, [out, retval] VARIANT *result);
293 [id(DISPID_TM_BASETYPES_IN)]
294 HRESULT basetypes_in([in] signed char c, [in] short s, [in] int i, [in] hyper h,
295 [in] unsigned char uc, [in] unsigned short us, [in] unsigned int ui,
296 [in] unsigned hyper uh, [in] float f, [in] double d, [in] STATE st);
298 [id(DISPID_TM_BASETYPES_OUT)]
299 HRESULT basetypes_out([out] signed char *c, [out] short *s, [out] int *i, [out] hyper *h,
300 [out] unsigned char *uc, [out] unsigned short *us, [out] unsigned int *ui,
301 [out] unsigned hyper *uh, [out] float *f, [out] double *d, [out] STATE *st);
303 [id(DISPID_TM_FLOAT_ABI)]
304 HRESULT float_abi([in] float f, [in] double d, [in] int i, [in] float f2, [in] double d2);
306 [id(DISPID_TM_INT_PTR)]
307 HRESULT int_ptr([in] int *in, [out] int *out, [in, out] int *in_out);
309 [id(DISPID_TM_INT_PTR_PTR)]
310 HRESULT int_ptr_ptr([in] int **in, [out] int **out, [in, out] int **in_out);
312 [id(DISPID_TM_IFACE_IN)]
313 HRESULT iface_in([in] IUnknown *unk, [in] IDispatch *disp, [in] ISomethingFromDispatch *sfd);
315 [id(DISPID_TM_IFACE_OUT)]
316 HRESULT iface_out([out] IUnknown **unk, [out] IDispatch **disp, [out] ISomethingFromDispatch **sfd);
318 [id(DISPID_TM_IFACE_PTR)]
319 HRESULT iface_ptr([in] ISomethingFromDispatch **in, [out] ISomethingFromDispatch **out, [in, out] ISomethingFromDispatch **in_out);
321 [id(DISPID_TM_IFACE_NOPTR)]
322 HRESULT iface_noptr([in] IUnknown unk, [in] IDispatch disp, [in] ISomethingFromDispatch sfd);
324 [id(DISPID_TM_BSTR)]
325 HRESULT bstr([in] BSTR in, [out] BSTR *out, [in] BSTR *in_ptr, [in, out] BSTR *in_out);
327 [id(DISPID_TM_VARIANT)]
328 HRESULT variant([in] VARIANT in, [out] VARIANT *out, [in] VARIANT *in_ptr, [in, out] VARIANT *in_out);
330 [id(DISPID_TM_SAFEARRAY)]
331 HRESULT safearray([in] SAFEARRAY(int) in, [out] SAFEARRAY(int) *out, [in] SAFEARRAY(int) *in_ptr, [in, out] SAFEARRAY(int) *in_out);
333 [id(DISPID_TM_STRUCT)]
334 HRESULT mystruct([in] MYSTRUCT in, [out] MYSTRUCT *out, [in] MYSTRUCT *in_ptr, [in, out] MYSTRUCT *in_out);
336 [id(DISPID_TM_STRUCT_PTR_PTR)]
337 HRESULT mystruct_ptr_ptr([in] MYSTRUCT **in);
339 struct thin
341 short a;
342 char b;
345 [id(DISPID_TM_THIN_STRUCT)]
346 HRESULT thin_struct([in] struct thin in);
348 [id(DISPID_TM_RECT)]
349 HRESULT rect([in] RECT in, [out] RECT *out, [in] RECT *in_ptr, [in, out] RECT *in_out);
351 struct complex
353 char c;
354 int i;
355 int *pi;
356 int **ppi;
357 ISomethingFromDispatch *iface;
358 ISomethingFromDispatch **iface_ptr;
359 BSTR bstr;
360 VARIANT var;
361 MYSTRUCT mystruct;
362 array_t arr;
363 myint_t myint;
366 [id(DISPID_TM_COMPLEX_STRUCT)]
367 HRESULT complex_struct([in] struct complex in);
369 [id(DISPID_TM_ARRAY)]
370 HRESULT array([in] array_t in, [out] array_t out, [in, out] array_t in_out);
372 [id(DISPID_TM_VARIANT_ARRAY)]
373 HRESULT variant_array([in] VARIANT in[2], [out] VARIANT out[2], [in, out] VARIANT in_out[2]);
375 [id(DISPID_TM_STRUCT_ARRAY)]
376 HRESULT mystruct_array([in] MYSTRUCT in[2]);
378 [id(DISPID_TM_TYPEDEF)]
379 HRESULT myint([in] myint_t val, [in] myint_t *ptr, [in] myint_t **ptr_ptr);
381 [id(DISPID_TM_COCLASS)]
382 HRESULT Coclass([in] Coclass1 *class1, [in] Coclass2 *class2, [in] Coclass3 *class3);
384 [id(DISPID_TM_COCLASS_PTR)]
385 HRESULT Coclass_ptr([in] Coclass1 **in, [out] Coclass1 **out, [in, out] Coclass1 **in_out);
387 [id(DISPID_TM_COCLASS_NOPTR)]
388 HRESULT Coclass_noptr([in] Coclass1 class1, [in] Coclass2 class2, [in] Coclass3 class3);
390 [id(DISPID_TM_NOINOUT)]
391 HRESULT no_in_out(BSTR str, int i);
395 odl,
396 uuid(a1f8cae3-c947-3c5f-a57c-c88b9b6f3586),
397 oleautomation,
398 dual
400 interface IStaticWidget : IDispatch
402 [id(DISPID_TM_TESTDUAL)]
403 HRESULT TestDual([in] ItestDual *p);
405 [id(DISPID_TM_TESTSECONDIFACE)]
406 HRESULT TestSecondIface([in] ITestSecondIface *p);
410 odl,
411 uuid(a028db05-30f0-4b93-b17a-41c72f831d84),
412 dual,
413 oleautomation
415 interface IKindaEnumWidget : IUnknown
417 HRESULT Next(
418 [out] IWidget **widget);
420 HRESULT Count(
421 [out] unsigned long *count);
423 HRESULT Reset();
425 HRESULT Clone(
426 [out] IKindaEnumWidget **ppenum);
430 odl,
431 uuid(a028db06-30f0-4b93-b17a-41c72f831d84),
433 interface INonOleAutomation : IUnknown
435 [id(DISPID_NOA_BSTRRET)]
436 BSTR BstrRet();
438 [id(DISPID_NOA_ERROR)]
439 HRESULT Error();
444 dllname("comm.drv"),
445 uuid(d377f60b-8639-4261-8ee7-75c8340d2cc9),
447 module BadModule
450 entry("Foo"),
452 HRESULT BadModuleFoo();
456 dllname("oleaut32.dll"),
457 uuid(d377f60c-8639-4261-8ee7-75c8340d2cc9),
459 module BadEntry
462 entry("Foo"),
464 HRESULT BadEntryFoo();
468 uuid(bb171948-10ec-407a-9a57-2f85f797ff1a),
469 appobject,
471 coclass ApplicationObject2
473 interface IWidget;
474 [source] interface IWidget;
478 odl,
479 uuid(375f8a9d-33d0-44f3-b972-61f8407899e0)
481 interface ItestIF1 : IUnknown
483 HRESULT fn1([in] int x);
484 HRESULT fn2([out,retval] int *x);
488 odl,
489 uuid(094056a3-666f-4956-be12-1859668310b8)
491 interface ItestIF2 : ItestIF1
493 HRESULT fn3([in] int y);
497 odl,
498 uuid(33baba09-2e68-43ab-81fe-d84b403df2e5)
500 dispinterface ItestIF3
502 interface ItestIF2;
506 odl,
507 uuid(a01005c7-7491-42eb-94f3-668e37ce60a6)
509 dispinterface ItestIF4
511 properties:
512 methods:
513 [id(0x1c)] HRESULT fn([in] int z);
517 odl,
518 uuid(4ab61e25-c09f-4239-8f7f-7a018ea0199f),
519 dual
521 interface ItestIF5 : ItestIF2
523 [id(0x1234)] HRESULT fn4([in] int a);
524 [id(0x1235)] HRESULT fn5([in] int a);
528 odl,
529 uuid(ec236d8e-2cc7-44f2-b394-36c86ff3da74)
531 interface ItestIF6 : IDispatch
533 [id(0x1234)] HRESULT fn4([in] int a);
534 [id(0x1235)] HRESULT fn5([in] int a);
538 odl,
539 uuid(f711b105-554d-4751-818c-46fcc5d7c0d5),
540 dual
542 interface ItestIF7 : ItestIF6
544 [id(0x1236)] HRESULT fn6([in] GUID a);
548 odl,
549 uuid(bdfa260b-ef40-43d3-b071-cddec919f132)
551 interface ItestIF8
553 HRESULT fn1([in] int x);
554 HRESULT fn2([out,retval] int *x);
558 odl,
559 uuid(51033a23-dc37-4f19-aa34-4d8a670458a0)
562 interface ItestIF9 : ItestIF8
564 HRESULT fn3([in] int y);
568 odl,
569 uuid(2e8f14fe-0bce-42f0-8b7d-3af8393c7967)
571 dispinterface ItestIF10
573 interface ItestIF9;
577 odl,
578 uuid(7d9e9371-482e-4944-9b19-511fc705236f)
580 dispinterface ItestIF11
582 interface ItestIF7;
586 object,
587 uuid(ec236d8e-2cc7-44f2-b394-46c86ff3da74),
588 dual,
589 oleautomation
591 interface ItestIF12 : IDispatch
593 [id(0x1234)] HRESULT fn4([in] int a);
594 [id(0x1235)] HRESULT fn5([in] int a);
598 object,
599 uuid(f711b105-554d-4751-818c-56fcc5d7c0d5),
600 dual,
601 oleautomation
603 interface ItestIF13 : ItestIF12
605 [id(0x1236)] HRESULT fn6([in] GUID a);