Add AppDefaults app selection to control panel
[wine/gsoc-2012-control.git] / dlls / oleaut32 / tests / tmarshal.idl
bloba26589dd0c992e11da47e3564d6330011f578b06
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(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586),
70 oleautomation,
71 dual
73 interface IWidget : IDispatch
75 [propput, id(DISPID_TM_NAME)]
76 HRESULT Name([in] BSTR name);
77 [propget, id(DISPID_TM_NAME)]
78 HRESULT Name([out, retval] BSTR *name);
80 [id(DISPID_TM_DOSOMETHING)]
81 HRESULT DoSomething([in] double number, [out] BSTR *str1, [in, defaultvalue("")] BSTR str2, [in, optional] VARIANT *opt);
83 [propget, id(DISPID_TM_STATE)]
84 HRESULT State([out, retval] STATE *state);
85 [propput, id(DISPID_TM_STATE)]
86 HRESULT State([in] STATE state);
88 [id(DISPID_TM_MAP)]
89 HRESULT Map([in] BSTR bstrId, [out, retval] BSTR *sValue);
91 [id(DISPID_TM_SETOLECOLOR)]
92 HRESULT SetOleColor([in] OLE_COLOR val);
94 [id(DISPID_TM_GETOLECOLOR)]
95 HRESULT GetOleColor([out, retval] OLE_COLOR *pVal);
97 [propget, id(DISPID_TM_CLONE)]
98 HRESULT Clone([out, retval] IWidget **ppVal);
100 [propget, id(DISPID_TM_CLONEDISPATCH)]
101 HRESULT CloneDispatch([out, retval] IDispatch **ppVal);
103 [propget, id(DISPID_TM_CLONECOCLASS)]
104 HRESULT CloneCoclass([out, retval] ApplicationObject2 **ppVal);
106 [propget, id(DISPID_VALUE)]
107 HRESULT Value([in] VARIANT *value, [out, retval] VARIANT *retval);
109 [id(DISPID_TM_ARRAY)]
110 HRESULT Array([in] SAFEARRAY(BSTR) values);
112 [id(DISPID_TM_VARARRAYPTR)]
113 HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values);
115 [id(DISPID_TM_VARCARRAY)]
116 HRESULT VariantCArray([in] ULONG count, [in, out] VARIANT values[2]);
118 [id(DISPID_TM_VARIANT)]
119 HRESULT Variant([in] VARIANT var);
121 [vararg, id(DISPID_TM_VARARG)]
122 HRESULT VarArg([in] int numexpect, [in] SAFEARRAY(VARIANT) values);
124 [id(DISPID_TM_STRUCTARGS)]
125 HRESULT StructArgs([in] MYSTRUCT byval, [in] MYSTRUCT *byptr, [in] MYSTRUCT arr[5]);
127 [id(DISPID_TM_ERROR)]
128 HRESULT Error();
130 [propget, id(DISPID_TM_CLONEINTERFACE)]
131 HRESULT CloneInterface([out, retval] ISomethingFromDispatch **ppVal);
133 [id(DISPID_TM_PROP_WITH_LCID), propput]
134 HRESULT prop_with_lcid([in,lcid] long lcid, [in] INT i);
136 [id(DISPID_TM_PROP_WITH_LCID), propget]
137 HRESULT prop_with_lcid([in,lcid] long lcid, [out,retval] INT *i);
139 [id(DISPID_TM_PROP_INT), propget]
140 HRESULT prop_int([out,retval] INT *i);
142 [id(DISPID_TM_PROP_UINT), propget]
143 HRESULT prop_uint([out,retval] UINT *i);
145 [id(DISPID_TM_BYREF_UINT)]
146 HRESULT ByRefUInt([in, out] UINT *i);
148 [id(DISPID_TM_PROP_OPT_ARG), propput]
149 HRESULT prop_opt_arg([in,optional] INT opt, [in] INT i);
151 [id(DISPID_TM_PROP_REQ_ARG), propput]
152 HRESULT prop_req_arg([in] INT req, [in] INT i);
154 [id(DISPID_TM_RESTRICTED), restricted]
155 HRESULT restrict([out, retval] INT *i);
157 [id(DISPID_TM_NEG_RESTRICTED), restricted]
158 HRESULT neg_restrict([out, retval] INT *i);
162 odl,
163 uuid(a1f8cae3-c947-3c5f-a57c-c88b9b6f3586),
164 oleautomation,
165 dual
167 interface IStaticWidget : IDispatch
169 [id(DISPID_TM_TESTDUAL)]
170 HRESULT TestDual([in] ItestDual *p);
174 odl,
175 uuid(a028db05-30f0-4b93-b17a-41c72f831d84),
176 #if 0 /* FIXME: commented out as causes widl to generate incorrect typelib */
177 dual,
178 #endif
179 oleautomation
181 interface IKindaEnumWidget : IUnknown
183 HRESULT Next(
184 [out] IWidget **widget);
186 HRESULT Count(
187 [out] unsigned long *count);
189 HRESULT Reset();
191 HRESULT Clone(
192 [out] IKindaEnumWidget **ppenum);
196 odl,
197 uuid(a028db06-30f0-4b93-b17a-41c72f831d84),
199 interface INonOleAutomation : IUnknown
201 [id(DISPID_NOA_BSTRRET)]
202 BSTR BstrRet();
204 [id(DISPID_NOA_ERROR)]
205 HRESULT Error();
210 dllname("comm.drv"),
211 uuid(d377f60b-8639-4261-8ee7-75c8340d2cc9),
213 module BadModule
216 entry("Foo"),
218 HRESULT BadModuleFoo();
222 dllname("oleaut32.dll"),
223 uuid(d377f60c-8639-4261-8ee7-75c8340d2cc9),
225 module BadEntry
228 entry("Foo"),
230 HRESULT BadEntryFoo();
234 uuid(bb171948-10ec-407a-9a57-2f85f797ff1a),
235 appobject,
237 coclass ApplicationObject2
239 interface IWidget;
240 [source] interface IWidget;
244 odl,
245 uuid(375f8a9d-33d0-44f3-b972-61f8407899e0)
247 interface ItestIF1 : IUnknown
249 HRESULT fn1([in] int x);
250 HRESULT fn2([out,retval] int *x);
254 odl,
255 uuid(094056a3-666f-4956-be12-1859668310b8)
257 interface ItestIF2 : ItestIF1
259 HRESULT fn3([in] int y);
263 odl,
264 uuid(33baba09-2e68-43ab-81fe-d84b403df2e5)
266 dispinterface ItestIF3
268 interface ItestIF2;
272 odl,
273 uuid(a01005c7-7491-42eb-94f3-668e37ce60a6)
275 dispinterface ItestIF4
277 properties:
278 methods:
279 [id(0x1c)] HRESULT fn([in] int z);
283 odl,
284 uuid(4ab61e25-c09f-4239-8f7f-7a018ea0199f),
285 dual
287 interface ItestIF5 : ItestIF2
289 [id(0x1234)] HRESULT fn4([in] int a);
290 [id(0x1235)] HRESULT fn5([in] int a);
294 odl,
295 uuid(ec236d8e-2cc7-44f2-b394-36c86ff3da74)
297 interface ItestIF6 : IDispatch
299 [id(0x1234)] HRESULT fn4([in] int a);
300 [id(0x1235)] HRESULT fn5([in] int a);
304 odl,
305 uuid(f711b105-554d-4751-818c-46fcc5d7c0d5),
306 dual
308 interface ItestIF7 : ItestIF6
310 [id(0x1236)] HRESULT fn6([in] GUID a);
314 odl,
315 uuid(bdfa260b-ef40-43d3-b071-cddec919f132)
317 interface ItestIF8
319 HRESULT fn1([in] int x);
320 HRESULT fn2([out,retval] int *x);
324 odl,
325 uuid(51033a23-dc37-4f19-aa34-4d8a670458a0)
328 interface ItestIF9 : ItestIF8
330 HRESULT fn3([in] int y);
334 odl,
335 uuid(2e8f14fe-0bce-42f0-8b7d-3af8393c7967)
337 dispinterface ItestIF10
339 interface ItestIF9;
343 odl,
344 uuid(7d9e9371-482e-4944-9b19-511fc705236f)
346 dispinterface ItestIF11
348 interface ItestIF7;