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
,
37 DISPID_TM_VARARRAYPTR
,
40 DISPID_TM_CLONEINTERFACE
,
42 DISPID_TM_PROP_WITH_LCID
,
46 DISPID_TM_PROP_OPT_ARG
,
47 DISPID_TM_PROP_REQ_ARG
,
49 DISPID_TM_TESTSECONDIFACE
,
51 DISPID_TM_VARARG_REF_RUN
,
53 DISPID_TM_BASETYPES_IN
,
54 DISPID_TM_BASETYPES_OUT
,
57 DISPID_TM_INT_PTR_PTR
,
61 DISPID_TM_IFACE_NOPTR
,
66 DISPID_TM_STRUCT_PTR_PTR
,
67 DISPID_TM_THIN_STRUCT
,
69 DISPID_TM_COMPLEX_STRUCT
,
71 DISPID_TM_VARIANT_ARRAY
,
72 DISPID_TM_STRUCT_ARRAY
,
75 DISPID_TM_COCLASS_PTR
,
76 DISPID_TM_COCLASS_NOPTR
,
80 static
const int DISPID_TM_NEG_RESTRICTED
= -26;
82 enum INonOleAutomation_dispids
84 DISPID_NOA_BSTRRET
= 1,
89 uuid(d96d8a3e
-78b6
-4c8d
-8f27
-059db959be8a
),
91 helpstring("Test Typelib")
95 importlib
("stdole2.tlb");
99 STATE_UNWIDGETIFIED
= 1,
103 typedef struct tagMYSTRUCT
110 typedef [public] int myint_t
;
112 typedef int array_t
[4];
114 coclass ApplicationObject2
;
119 uuid(12345678-1234-4321-1234-121212121212)
121 interface ISomethingFromDispatch
: IDispatch
123 HRESULT anotherfn
(void);
130 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c7967
)
132 interface ItestDual
: IDispatch
139 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c7968
)
141 interface ITestSecondIface
: IUnknown
150 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c7969
)
152 interface ITestSecondDisp
: IDispatch
159 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c796a
)
161 interface ICoclass1
: IDispatch
168 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c796b
)
170 interface ICoclass2
: IDispatch
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
)
184 [default] interface ICoclass1
;
189 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c796d
)
194 [default] interface ICoclass2
;
198 uuid(3f7e06fe
-0bce
-46f0
-8b7d
-3a68393c796e
)
208 uuid(a1f8cae3
-c947
-4c5f
-b57d
-c87b9b5f3586
),
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
);
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
)]
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
);
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);
345 [id(DISPID_TM_THIN_STRUCT
)]
346 HRESULT thin_struct
([in] struct thin
in);
349 HRESULT rect
([in] RECT
in, [out] RECT
*out, [in] RECT
*in_ptr
, [in, out] RECT
*in_out
);
357 ISomethingFromDispatch
*iface
;
358 ISomethingFromDispatch
**iface_ptr
;
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
);
396 uuid(a1f8cae3
-c947
-3c5f
-a57c
-c88b9b6f3586
),
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
);
411 uuid(a028db05
-30f0
-4b93
-b17a
-41c72f831d84
),
415 interface IKindaEnumWidget
: IUnknown
418 [out] IWidget
**widget
);
421 [out] unsigned long *count
);
426 [out] IKindaEnumWidget
**ppenum
);
431 uuid(a028db06
-30f0
-4b93
-b17a
-41c72f831d84
),
433 interface INonOleAutomation
: IUnknown
435 [id(DISPID_NOA_BSTRRET
)]
438 [id(DISPID_NOA_ERROR
)]
445 uuid(d377f60b
-8639-4261-8ee7
-75c8340d2cc9
),
452 HRESULT BadModuleFoo
();
456 dllname("oleaut32.dll"),
457 uuid(d377f60c
-8639-4261-8ee7
-75c8340d2cc9
),
464 HRESULT BadEntryFoo
();
468 uuid(bb171948
-10ec
-407a
-9a57
-2f85f797ff1a
),
471 coclass ApplicationObject2
474 [source] interface IWidget
;
479 uuid(375f8a9d
-33d0
-44f3
-b972
-61f8407899e0
)
481 interface ItestIF1
: IUnknown
483 HRESULT fn1
([in] int x
);
484 HRESULT fn2
([out,retval] int *x
);
489 uuid(094056a3
-666f
-4956-be12
-1859668310b8
)
491 interface ItestIF2
: ItestIF1
493 HRESULT fn3
([in] int y
);
498 uuid(33baba09
-2e68
-43ab
-81fe
-d84b403df2e5
)
500 dispinterface ItestIF3
507 uuid(a01005c7
-7491-42eb
-94f3
-668e37ce60a6
)
509 dispinterface ItestIF4
513 [id(0x1c)] HRESULT fn
([in] int z
);
518 uuid(4ab61e25
-c09f
-4239-8f7f
-7a018ea0199f
),
521 interface ItestIF5
: ItestIF2
523 [id(0x1234)] HRESULT fn4
([in] int a
);
524 [id(0x1235)] HRESULT fn5
([in] int a
);
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
);
539 uuid(f711b105
-554d
-4751-818c
-46fcc5d7c0d5
),
542 interface ItestIF7
: ItestIF6
544 [id(0x1236)] HRESULT fn6
([in] GUID a
);
549 uuid(bdfa260b
-ef40
-43d3
-b071
-cddec919f132
)
553 HRESULT fn1
([in] int x
);
554 HRESULT fn2
([out,retval] int *x
);
559 uuid(51033a23
-dc37
-4f19
-aa34
-4d8a670458a0
)
562 interface ItestIF9
: ItestIF8
564 HRESULT fn3
([in] int y
);
569 uuid(2e8f14fe
-0bce
-42f0
-8b7d
-3af8393c7967
)
571 dispinterface ItestIF10
578 uuid(7d9e9371
-482e-4944-9b19
-511fc705236f
)
580 dispinterface ItestIF11
587 uuid(ec236d8e
-2cc7
-44f2
-b394
-46c86ff3da74
),
591 interface ItestIF12
: IDispatch
593 [id(0x1234)] HRESULT fn4
([in] int a
);
594 [id(0x1235)] HRESULT fn5
([in] int a
);
599 uuid(f711b105
-554d
-4751-818c
-56fcc5d7c0d5
),
603 interface ItestIF13
: ItestIF12
605 [id(0x1236)] HRESULT fn6
([in] GUID a
);