oleaut32: Added test showing need to QueryInterface on dual interface in ITypeInfo...
[wine/hacks.git] / dlls / oleaut32 / tests / tmarshal.idl
blob2367f2894f1cc1f8f68a108d97fefb624f7936a4
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 coclass ApplicationObject2;
41 odl,
42 uuid(12345678-1234-4321-1234-121212121212)
44 interface ISomethingFromDispatch : IDispatch
46 HRESULT anotherfn(void);
50 odl,
51 oleautomation,
52 dual,
53 uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7967)
55 interface ItestDual : IDispatch
57 HRESULT test();
61 odl,
62 uuid(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586),
63 oleautomation,
64 dual
66 interface IWidget : IDispatch
68 [propput, id(DISPID_TM_NAME)]
69 HRESULT Name([in] BSTR name);
70 [propget, id(DISPID_TM_NAME)]
71 HRESULT Name([out, retval] BSTR *name);
73 [id(DISPID_TM_DOSOMETHING)]
74 HRESULT DoSomething([in] double number, [out] BSTR *str1, [in, defaultvalue("")] BSTR str2, [in, optional] VARIANT *opt);
76 [propget, id(DISPID_TM_STATE)]
77 HRESULT State([out, retval] STATE *state);
78 [propput, id(DISPID_TM_STATE)]
79 HRESULT State([in] STATE state);
81 [id(DISPID_TM_MAP)]
82 HRESULT Map([in] BSTR bstrId, [out, retval] BSTR *sValue);
84 [id(DISPID_TM_SETOLECOLOR)]
85 HRESULT SetOleColor([in] OLE_COLOR val);
87 [id(DISPID_TM_GETOLECOLOR)]
88 HRESULT GetOleColor([out, retval] OLE_COLOR *pVal);
90 [propget, id(DISPID_TM_CLONE)]
91 HRESULT Clone([out, retval] IWidget **ppVal);
93 [propget, id(DISPID_TM_CLONEDISPATCH)]
94 HRESULT CloneDispatch([out, retval] IDispatch **ppVal);
96 [propget, id(DISPID_TM_CLONECOCLASS)]
97 HRESULT CloneCoclass([out, retval] ApplicationObject2 **ppVal);
99 [propget, id(DISPID_VALUE)]
100 HRESULT Value([in] VARIANT *value, [out, retval] VARIANT *retval);
102 [id(DISPID_TM_ARRAY)]
103 HRESULT Array([in] SAFEARRAY(BSTR) values);
105 [id(DISPID_TM_VARARRAYPTR)]
106 HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values);
108 [id(DISPID_TM_VARIANT)]
109 void Variant([in] VARIANT var);
111 [vararg, id(DISPID_TM_VARARG)]
112 void VarArg([in] int numexpect, [in] SAFEARRAY(VARIANT) values);
114 [id(DISPID_TM_ERROR)]
115 HRESULT Error();
117 [propget, id(DISPID_TM_CLONEINTERFACE)]
118 HRESULT CloneInterface([out, retval] ISomethingFromDispatch **ppVal);
122 odl,
123 uuid(a1f8cae3-c947-3c5f-a57c-c88b9b6f3586),
124 oleautomation,
125 dual
127 interface IStaticWidget : IDispatch
129 [id(DISPID_TM_TESTDUAL)]
130 HRESULT TestDual([in] ItestDual *p);
134 odl,
135 uuid(a028db05-30f0-4b93-b17a-41c72f831d84),
136 #if 0 /* FIXME: commented out as causes widl to generate incorrect typelib */
137 dual,
138 #endif
139 oleautomation
141 interface IKindaEnumWidget : IUnknown
143 HRESULT Next(
144 [out] IWidget **widget);
146 HRESULT Count(
147 [out] unsigned long *count);
149 HRESULT Reset();
151 HRESULT Clone(
152 [out] IKindaEnumWidget **ppenum);
156 odl,
157 uuid(a028db06-30f0-4b93-b17a-41c72f831d84),
159 interface INonOleAutomation : IUnknown
161 [id(DISPID_NOA_BSTRRET)]
162 BSTR BstrRet();
167 dllname("comm.drv"),
168 uuid(d377f60b-8639-4261-8ee7-75c8340d2cc9),
170 module BadModule
173 entry("Foo"),
175 HRESULT BadModuleFoo();
179 dllname("oleaut32.dll"),
180 uuid(d377f60c-8639-4261-8ee7-75c8340d2cc9),
182 module BadEntry
185 entry("Foo"),
187 HRESULT BadEntryFoo();
191 uuid(bb171948-10ec-407a-9a57-2f85f797ff1a),
192 appobject,
194 coclass ApplicationObject2
196 interface IWidget;
197 [source] interface IWidget;
201 odl,
202 uuid(375f8a9d-33d0-44f3-b972-61f8407899e0)
204 interface ItestIF1 : IUnknown
206 HRESULT fn1([in] int x);
207 HRESULT fn2([out,retval] int *x);
211 odl,
212 uuid(094056a3-666f-4956-be12-1859668310b8)
214 interface ItestIF2 : ItestIF1
216 HRESULT fn3([in] int y);
220 odl,
221 uuid(33baba09-2e68-43ab-81fe-d84b403df2e5)
223 dispinterface ItestIF3
225 interface ItestIF2;
229 odl,
230 uuid(a01005c7-7491-42eb-94f3-668e37ce60a6)
232 dispinterface ItestIF4
234 properties:
235 methods:
236 [id(0x1c)] HRESULT fn([in] int z);
240 odl,
241 uuid(4ab61e25-c09f-4239-8f7f-7a018ea0199f),
242 dual
244 interface ItestIF5 : ItestIF2
246 [id(0x1234)] HRESULT fn4([in] int a);
247 [id(0x1235)] HRESULT fn5([in] int a);
251 odl,
252 uuid(ec236d8e-2cc7-44f2-b394-36c86ff3da74)
254 interface ItestIF6 : IDispatch
256 [id(0x1234)] HRESULT fn4([in] int a);
257 [id(0x1235)] HRESULT fn5([in] int a);
261 odl,
262 uuid(f711b105-554d-4751-818c-46fcc5d7c0d5),
263 dual
265 interface ItestIF7 : ItestIF6
267 [id(0x1236)] HRESULT fn6([in] int a);
271 odl,
272 uuid(bdfa260b-ef40-43d3-b071-cddec919f132)
274 interface ItestIF8
276 HRESULT fn1([in] int x);
277 HRESULT fn2([out,retval] int *x);
281 odl,
282 uuid(51033a23-dc37-4f19-aa34-4d8a670458a0)
285 interface ItestIF9 : ItestIF8
287 HRESULT fn3([in] int y);
291 odl,
292 uuid(2e8f14fe-0bce-42f0-8b7d-3af8393c7967)
294 dispinterface ItestIF10
296 interface ItestIF9;
300 odl,
301 uuid(7d9e9371-482e-4944-9b19-511fc705236f)
303 dispinterface ItestIF11
305 interface ItestIF7;