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
21 #pragma makedep typelib
28 DISPID_TM_DOSOMETHING
,
31 DISPID_TM_SETOLECOLOR
,
32 DISPID_TM_GETOLECOLOR
,
34 DISPID_TM_CLONEDISPATCH
,
35 DISPID_TM_CLONECOCLASS
,
38 DISPID_TM_VARARRAYPTR
,
43 DISPID_TM_CLONEINTERFACE
,
45 DISPID_TM_PROP_WITH_LCID
,
49 DISPID_TM_PROP_OPT_ARG
,
50 DISPID_TM_PROP_REQ_ARG
,
52 DISPID_TM_TESTSECONDIFACE
,
54 DISPID_TM_VARARG_REF_RUN
,
57 DISPID_TM_BASETYPES_IN
,
58 DISPID_TM_BASETYPES_OUT
,
60 DISPID_TM_INT_PTR_PTR
,
68 static
const int DISPID_TM_NEG_RESTRICTED
= -26;
70 enum INonOleAutomation_dispids
72 DISPID_NOA_BSTRRET
= 1,
77 uuid(d96d8a3e
-78b6
-4c8d
-8f27
-059db959be8a
),
79 helpstring("Test Typelib")
83 importlib
("stdole2.tlb");
87 STATE_UNWIDGETIFIED
= 1,
91 typedef struct tagMYSTRUCT
98 coclass ApplicationObject2
;
103 uuid(12345678-1234-4321-1234-121212121212)
105 interface ISomethingFromDispatch
: IDispatch
107 HRESULT anotherfn
(void);
114 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c7967
)
116 interface ItestDual
: IDispatch
123 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c7968
)
125 interface ITestSecondIface
: IUnknown
134 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c7969
)
136 interface ITestSecondDisp
: IDispatch
143 uuid(a1f8cae3
-c947
-4c5f
-b57d
-c87b9b5f3586
),
147 interface IWidget
: IDispatch
149 [propput, id(DISPID_TM_NAME
)]
150 HRESULT Name
([in] BSTR name
);
151 [propget, id(DISPID_TM_NAME
)]
152 HRESULT Name
([out, retval] BSTR *name
);
154 [id(DISPID_TM_DOSOMETHING
)]
155 HRESULT DoSomething
([in] double number
, [out] BSTR *str1
, [in, defaultvalue("")] BSTR str2
, [in, optional] VARIANT *opt
);
157 [propget, id(DISPID_TM_STATE
)]
158 HRESULT State
([out, retval] STATE
*state
);
159 [propput, id(DISPID_TM_STATE
)]
160 HRESULT State
([in] STATE state
);
163 HRESULT Map
([in] BSTR bstrId
, [out, retval] BSTR *sValue
);
165 [id(DISPID_TM_SETOLECOLOR
)]
166 HRESULT SetOleColor
([in] OLE_COLOR val
);
168 [id(DISPID_TM_GETOLECOLOR
)]
169 HRESULT GetOleColor
([out, retval] OLE_COLOR
*pVal
);
171 [propget, id(DISPID_TM_CLONE
)]
172 HRESULT Clone
([out, retval] IWidget
**ppVal
);
174 [propget, id(DISPID_TM_CLONEDISPATCH
)]
175 HRESULT CloneDispatch
([out, retval] IDispatch
**ppVal
);
177 [propget, id(DISPID_TM_CLONECOCLASS
)]
178 HRESULT CloneCoclass
([out, retval] ApplicationObject2
**ppVal
);
180 [propget, id(DISPID_VALUE
)]
181 HRESULT Value
([in] VARIANT *value
, [out, retval] VARIANT *retval);
183 [id(DISPID_TM_ARRAY
)]
184 HRESULT Array
([in] SAFEARRAY(BSTR) values
);
186 [id(DISPID_TM_VARARRAYPTR
)]
187 HRESULT VariantArrayPtr
([in] SAFEARRAY(VARIANT) *values
);
189 [id(DISPID_TM_VARCARRAY
)]
190 HRESULT VariantCArray
([in] ULONG count
, [in, out] VARIANT values
[2]);
192 [vararg, id(DISPID_TM_VARARG
)]
193 HRESULT VarArg([in] int numexpect
, [in] SAFEARRAY(VARIANT) values
);
195 [id(DISPID_TM_STRUCTARGS
)]
196 HRESULT StructArgs
([in] MYSTRUCT byval
, [in] MYSTRUCT
*byptr
, [in] MYSTRUCT arr
[5]);
198 [id(DISPID_TM_ERROR
)]
201 [propget, id(DISPID_TM_CLONEINTERFACE
)]
202 HRESULT CloneInterface
([out, retval] ISomethingFromDispatch
**ppVal
);
204 [id(DISPID_TM_PROP_WITH_LCID
), propput]
205 HRESULT prop_with_lcid
([in,lcid] long lcid, [in] INT i
);
207 [id(DISPID_TM_PROP_WITH_LCID
), propget]
208 HRESULT prop_with_lcid
([in,lcid] long lcid, [out,retval] INT *i
);
210 [id(DISPID_TM_PROP_INT
), propget]
211 HRESULT prop_int
([out,retval] INT *i
);
213 [id(DISPID_TM_PROP_UINT
), propget]
214 HRESULT prop_uint
([out,retval] UINT
*i
);
216 [id(DISPID_TM_BYREF_UINT
)]
217 HRESULT ByRefUInt
([in, out] UINT
*i
);
219 [id(DISPID_TM_PROP_OPT_ARG
), propput]
220 HRESULT prop_opt_arg
([in,optional] INT opt
, [in] INT i
);
222 [id(DISPID_TM_PROP_REQ_ARG
), propput]
223 HRESULT prop_req_arg
([in] INT req
, [in] INT i
);
225 [id(DISPID_TM_RESTRICTED
), restricted]
226 HRESULT pos_restrict
([out, retval] INT *i
);
228 [id(DISPID_TM_NEG_RESTRICTED
), restricted]
229 HRESULT neg_restrict
([out, retval] INT *i
);
231 [id(DISPID_TM_VARARG_RUN
), vararg]
232 HRESULT VarArg_Run
([in] BSTR name
, [in] SAFEARRAY(VARIANT) params
, [out, retval] VARIANT *result
);
234 [id(DISPID_TM_VARARG_REF_RUN
), vararg]
235 HRESULT VarArg_Ref_Run
([in] BSTR name
, [in] SAFEARRAY(VARIANT) *params
, [out, retval] VARIANT *result
);
237 [id(DISPID_TM_COCLASS
)]
238 HRESULT Coclass([in] ApplicationObject2
*param
);
240 [id(DISPID_TM_BASETYPES_IN
)]
241 HRESULT basetypes_in
([in] signed char c
, [in] short s
, [in] int i
, [in] hyper h
,
242 [in] unsigned char uc
, [in] unsigned short us
, [in] unsigned int ui
,
243 [in] unsigned hyper uh
, [in] float f
, [in] double d
, [in] STATE st
);
245 [id(DISPID_TM_BASETYPES_OUT
)]
246 HRESULT basetypes_out
([out] signed char *c
, [out] short *s
, [out] int *i
, [out] hyper *h
,
247 [out] unsigned char *uc
, [out] unsigned short *us
, [out] unsigned int *ui
,
248 [out] unsigned hyper *uh
, [out] float *f
, [out] double *d
, [out] STATE
*st
);
250 [id(DISPID_TM_INT_PTR
)]
251 HRESULT int_ptr
([in] int *in, [out] int *out, [in, out] int *in_out
);
253 [id(DISPID_TM_INT_PTR_PTR
)]
254 HRESULT int_ptr_ptr
([in] int **in, [out] int **out, [in, out] int **in_out
);
256 [id(DISPID_TM_IFACE_IN
)]
257 HRESULT iface_in
([in] IUnknown
*unk
, [in] IDispatch
*disp
, [in] ISomethingFromDispatch
*sfd
);
259 [id(DISPID_TM_IFACE_OUT
)]
260 HRESULT iface_out
([out] IUnknown
**unk
, [out] IDispatch
**disp
, [out] ISomethingFromDispatch
**sfd
);
262 [id(DISPID_TM_IFACE_PTR
)]
263 HRESULT iface_ptr
([in] ISomethingFromDispatch
**in, [out] ISomethingFromDispatch
**out, [in, out] ISomethingFromDispatch
**in_out
);
266 HRESULT bstr([in] BSTR in, [out] BSTR *out, [in] BSTR *in_ptr
, [in, out] BSTR *in_out
);
268 [id(DISPID_TM_VARIANT
)]
269 HRESULT variant([in] VARIANT in, [out] VARIANT *out, [in] VARIANT *in_ptr
, [in, out] VARIANT *in_out
);
274 uuid(a1f8cae3
-c947
-3c5f
-a57c
-c88b9b6f3586
),
278 interface IStaticWidget
: IDispatch
280 [id(DISPID_TM_TESTDUAL
)]
281 HRESULT TestDual
([in] ItestDual
*p
);
283 [id(DISPID_TM_TESTSECONDIFACE
)]
284 HRESULT TestSecondIface
([in] ITestSecondIface
*p
);
289 uuid(a028db05
-30f0
-4b93
-b17a
-41c72f831d84
),
293 interface IKindaEnumWidget
: IUnknown
296 [out] IWidget
**widget
);
299 [out] unsigned long *count
);
304 [out] IKindaEnumWidget
**ppenum
);
309 uuid(a028db06
-30f0
-4b93
-b17a
-41c72f831d84
),
311 interface INonOleAutomation
: IUnknown
313 [id(DISPID_NOA_BSTRRET
)]
316 [id(DISPID_NOA_ERROR
)]
323 uuid(d377f60b
-8639-4261-8ee7
-75c8340d2cc9
),
330 HRESULT BadModuleFoo
();
334 dllname("oleaut32.dll"),
335 uuid(d377f60c
-8639-4261-8ee7
-75c8340d2cc9
),
342 HRESULT BadEntryFoo
();
346 uuid(bb171948
-10ec
-407a
-9a57
-2f85f797ff1a
),
349 coclass ApplicationObject2
352 [source] interface IWidget
;
357 uuid(375f8a9d
-33d0
-44f3
-b972
-61f8407899e0
)
359 interface ItestIF1
: IUnknown
361 HRESULT fn1
([in] int x
);
362 HRESULT fn2
([out,retval] int *x
);
367 uuid(094056a3
-666f
-4956-be12
-1859668310b8
)
369 interface ItestIF2
: ItestIF1
371 HRESULT fn3
([in] int y
);
376 uuid(33baba09
-2e68
-43ab
-81fe
-d84b403df2e5
)
378 dispinterface ItestIF3
385 uuid(a01005c7
-7491-42eb
-94f3
-668e37ce60a6
)
387 dispinterface ItestIF4
391 [id(0x1c)] HRESULT fn
([in] int z
);
396 uuid(4ab61e25
-c09f
-4239-8f7f
-7a018ea0199f
),
399 interface ItestIF5
: ItestIF2
401 [id(0x1234)] HRESULT fn4
([in] int a
);
402 [id(0x1235)] HRESULT fn5
([in] int a
);
407 uuid(ec236d8e
-2cc7
-44f2
-b394
-36c86ff3da74
)
409 interface ItestIF6
: IDispatch
411 [id(0x1234)] HRESULT fn4
([in] int a
);
412 [id(0x1235)] HRESULT fn5
([in] int a
);
417 uuid(f711b105
-554d
-4751-818c
-46fcc5d7c0d5
),
420 interface ItestIF7
: ItestIF6
422 [id(0x1236)] HRESULT fn6
([in] GUID a
);
427 uuid(bdfa260b
-ef40
-43d3
-b071
-cddec919f132
)
431 HRESULT fn1
([in] int x
);
432 HRESULT fn2
([out,retval] int *x
);
437 uuid(51033a23
-dc37
-4f19
-aa34
-4d8a670458a0
)
440 interface ItestIF9
: ItestIF8
442 HRESULT fn3
([in] int y
);
447 uuid(2e8f14fe
-0bce
-42f0
-8b7d
-3af8393c7967
)
449 dispinterface ItestIF10
456 uuid(7d9e9371
-482e-4944-9b19
-511fc705236f
)
458 dispinterface ItestIF11