ReactOS  0.4.14-dev-49-gfb4591c
tmarshal.idl
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005 Robert Shearman
3  *
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.
8  *
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.
13  *
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
17  *
18  */
19 
20 #pragma makedep ident
21 #pragma makedep typelib
22 
23 import "ocidl.idl";
24 
26 {
52 
74 };
75 
76 static const int DISPID_TM_NEG_RESTRICTED = -26;
77 
79 {
82 };
83 
84 [
85  uuid(d96d8a3e-78b6-4c8d-8f27-059db959be8a),
86  version(2.5),
87  helpstring("Test Typelib")
88 ]
90 {
91  importlib("stdole2.tlb");
92 
93  typedef enum tagSTATE
94  {
97  } STATE;
98 
99  typedef struct tagMYSTRUCT
100  {
103  UINT uarr[8];
104  } MYSTRUCT;
105 
106  typedef [public] int myint_t;
107 
108  coclass ApplicationObject2;
109 
110  [
111  odl,
113  uuid(12345678-1234-4321-1234-121212121212)
114  ]
116  {
117  HRESULT anotherfn(void);
118  }
119 
120  [
121  odl,
123  dual,
124  uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7967)
125  ]
126  interface ItestDual : IDispatch
127  {
128  HRESULT test();
129  }
130 
131  [
132  odl,
133  uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7968)
134  ]
136  {
137  HRESULT test();
138  }
139 
140  [
141  odl,
143  dual,
144  uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7969)
145  ]
147  {
148  HRESULT test();
149  }
150 
151  [
153  uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796a)
154  ]
155  interface ICoclass1 : IDispatch
156  {
157  HRESULT test();
158  }
159 
160  [
162  uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796b)
163  ]
164  interface ICoclass2 : IDispatch
165  {
166  HRESULT test();
167  }
168 
169  [
170  uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796c)
171  ]
172  coclass Coclass1
173  {
174  [default] interface ICoclass1;
175  interface ICoclass2;
176  }
177 
178  [
179  uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796d)
180  ]
181  coclass Coclass2
182  {
183  interface ICoclass1;
184  [default] interface ICoclass2;
185  }
186 
187  [
188  uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c796e)
189  ]
190  coclass Coclass3
191  {
192  interface ICoclass1;
193  interface ICoclass2;
194  }
195 
196  [
197  odl,
198  uuid(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586),
200  dual
201  ]
202  interface IWidget : IDispatch
203  {
204  [propput, id(DISPID_TM_NAME)]
205  HRESULT Name([in] BSTR name);
206  [propget, id(DISPID_TM_NAME)]
207  HRESULT Name([out, retval] BSTR *name);
208 
210  HRESULT DoSomething([in] double number, [out] BSTR *str1, [in, defaultvalue("")] BSTR str2, [in, optional] VARIANT *opt);
211 
212  [propget, id(DISPID_TM_STATE)]
213  HRESULT State([out, retval] STATE *state);
214  [propput, id(DISPID_TM_STATE)]
216 
217  [id(DISPID_TM_MAP)]
218  HRESULT Map([in] BSTR bstrId, [out, retval] BSTR *sValue);
219 
221  HRESULT SetOleColor([in] OLE_COLOR val);
222 
224  HRESULT GetOleColor([out, retval] OLE_COLOR *pVal);
225 
226  [propget, id(DISPID_TM_CLONE)]
227  HRESULT Clone([out, retval] IWidget **ppVal);
228 
229  [propget, id(DISPID_TM_CLONEDISPATCH)]
230  HRESULT CloneDispatch([out, retval] IDispatch **ppVal);
231 
232  [propget, id(DISPID_TM_CLONECOCLASS)]
233  HRESULT CloneCoclass([out, retval] ApplicationObject2 **ppVal);
234 
235  [propget, id(DISPID_VALUE)]
236  HRESULT Value([in] VARIANT *value, [out, retval] VARIANT *retval);
237 
239  HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values);
240 
241  [vararg, id(DISPID_TM_VARARG)]
242  HRESULT VarArg([in] int numexpect, [in] SAFEARRAY(VARIANT) values);
243 
245  HRESULT Error();
246 
247  [propget, id(DISPID_TM_CLONEINTERFACE)]
248  HRESULT CloneInterface([out, retval] ISomethingFromDispatch **ppVal);
249 
250  [id(DISPID_TM_PROP_WITH_LCID), propput]
251  HRESULT prop_with_lcid([in,lcid] long lcid, [in] INT i);
252 
253  [id(DISPID_TM_PROP_WITH_LCID), propget]
254  HRESULT prop_with_lcid([in,lcid] long lcid, [out,retval] INT *i);
255 
256  [id(DISPID_TM_PROP_INT), propget]
257  HRESULT prop_int([out,retval] INT *i);
258 
259  [id(DISPID_TM_PROP_UINT), propget]
260  HRESULT prop_uint([out,retval] UINT *i);
261 
263  HRESULT ByRefUInt([in, out] UINT *i);
264 
265  [id(DISPID_TM_PROP_OPT_ARG), propput]
266  HRESULT prop_opt_arg([in,optional] INT opt, [in] INT i);
267 
268  [id(DISPID_TM_PROP_REQ_ARG), propput]
269  HRESULT prop_req_arg([in] INT req, [in] INT i);
270 
271  [id(DISPID_TM_RESTRICTED), restricted]
272  HRESULT pos_restrict([out, retval] INT *i);
273 
274  [id(DISPID_TM_NEG_RESTRICTED), restricted]
275  HRESULT neg_restrict([out, retval] INT *i);
276 
277  [id(DISPID_TM_VARARG_RUN), vararg]
278  HRESULT VarArg_Run([in] BSTR name, [in] SAFEARRAY(VARIANT) params, [out, retval] VARIANT *result);
279 
280  [id(DISPID_TM_VARARG_REF_RUN), vararg]
281  HRESULT VarArg_Ref_Run([in] BSTR name, [in] SAFEARRAY(VARIANT) *params, [out, retval] VARIANT *result);
282 
284  HRESULT basetypes_in([in] signed char c, [in] short s, [in] int i, [in] hyper h,
285  [in] unsigned char uc, [in] unsigned short us, [in] unsigned int ui,
286  [in] unsigned hyper uh, [in] float f, [in] double d, [in] STATE st);
287 
289  HRESULT basetypes_out([out] signed char *c, [out] short *s, [out] int *i, [out] hyper *h,
290  [out] unsigned char *uc, [out] unsigned short *us, [out] unsigned int *ui,
291  [out] unsigned hyper *uh, [out] float *f, [out] double *d, [out] STATE *st);
292 
294  HRESULT float_abi([in] float f, [in] double d, [in] int i, [in] float f2, [in] double d2);
295 
297  HRESULT int_ptr([in] int *in, [out] int *out, [in, out] int *in_out);
298 
300  HRESULT int_ptr_ptr([in] int **in, [out] int **out, [in, out] int **in_out);
301 
303  HRESULT iface_in([in] IUnknown *unk, [in] IDispatch *disp, [in] ISomethingFromDispatch *sfd);
304 
306  HRESULT iface_out([out] IUnknown **unk, [out] IDispatch **disp, [out] ISomethingFromDispatch **sfd);
307 
310 
312  HRESULT bstr([in] BSTR in, [out] BSTR *out, [in] BSTR *in_ptr, [in, out] BSTR *in_out);
315  HRESULT variant([in] VARIANT in, [out] VARIANT *out, [in] VARIANT *in_ptr, [in, out] VARIANT *in_out);
316 
318  HRESULT safearray([in] SAFEARRAY(int) in, [out] SAFEARRAY(int) *out, [in] SAFEARRAY(int) *in_ptr, [in, out] SAFEARRAY(int) *in_out);
319 
321  HRESULT mystruct([in] MYSTRUCT in, [out] MYSTRUCT *out, [in] MYSTRUCT *in_ptr, [in, out] MYSTRUCT *in_out);
322 
324  HRESULT mystruct_ptr_ptr([in] MYSTRUCT **in);
325 
326  struct thin
327  {
328  short a;
329  char b;
330  };
331 
333  HRESULT thin_struct([in] struct thin in);
334 
335  [id(DISPID_TM_RECT)]
336  HRESULT rect([in] RECT in, [out] RECT *out, [in] RECT *in_ptr, [in, out] RECT *in_out);
337 
338  typedef int array_t[4];
339 
341  HRESULT array([in] array_t in, [out] array_t out, [in, out] array_t in_out);
342 
344  HRESULT variant_array([in] VARIANT in[2], [out] VARIANT out[2], [in, out] VARIANT in_out[2]);
345 
347  HRESULT mystruct_array([in] MYSTRUCT in[2]);
348 
350  HRESULT myint([in] myint_t val, [in] myint_t *ptr, [in] myint_t **ptr_ptr);
351 
353  HRESULT Coclass([in] Coclass1 *class1, [in] Coclass2 *class2, [in] Coclass3 *class3);
354 
356  HRESULT Coclass_ptr([in] Coclass1 **in, [out] Coclass1 **out, [in, out] Coclass1 **in_out);
357  }
358 
359  [
360  odl,
361  uuid(a1f8cae3-c947-3c5f-a57c-c88b9b6f3586),
363  dual
364  ]
366  {
369 
372  }
373 
374  [
375  odl,
376  uuid(a028db05-30f0-4b93-b17a-41c72f831d84),
377  dual,
379  ]
381  {
382  HRESULT Next(
383  [out] IWidget **widget);
384 
385  HRESULT Count(
386  [out] unsigned long *count);
387 
388  HRESULT Reset();
389 
390  HRESULT Clone(
391  [out] IKindaEnumWidget **ppenum);
392  }
393 
394  [
395  odl,
396  uuid(a028db06-30f0-4b93-b17a-41c72f831d84),
397  ]
399  {
401  BSTR BstrRet();
402 
404  HRESULT Error();
405  }
406 
407 
408  [
409  dllname("comm.drv"),
410  uuid(d377f60b-8639-4261-8ee7-75c8340d2cc9),
411  ]
412  module BadModule
413  {
414  [
415  entry("Foo"),
416  ]
418  };
419 
420  [
421  dllname("oleaut32.dll"),
422  uuid(d377f60c-8639-4261-8ee7-75c8340d2cc9),
423  ]
424  module BadEntry
425  {
426  [
427  entry("Foo"),
428  ]
430  };
431 
432  [
433  uuid(bb171948-10ec-407a-9a57-2f85f797ff1a),
434  appobject,
435  ]
437  {
438  interface IWidget;
439  [source] interface IWidget;
440  };
441 
442  [
443  odl,
444  uuid(375f8a9d-33d0-44f3-b972-61f8407899e0)
445  ]
446  interface ItestIF1 : IUnknown
447  {
448  HRESULT fn1([in] int x);
449  HRESULT fn2([out,retval] int *x);
450  }
451 
452  [
453  odl,
454  uuid(094056a3-666f-4956-be12-1859668310b8)
455  ]
456  interface ItestIF2 : ItestIF1
457  {
458  HRESULT fn3([in] int y);
459  }
460 
461  [
462  odl,
463  uuid(33baba09-2e68-43ab-81fe-d84b403df2e5)
464  ]
465  dispinterface ItestIF3
466  {
467  interface ItestIF2;
468  }
469 
470  [
471  odl,
472  uuid(a01005c7-7491-42eb-94f3-668e37ce60a6)
473  ]
474  dispinterface ItestIF4
475  {
476  properties:
477  methods:
478  [id(0x1c)] HRESULT fn([in] int z);
479  }
480 
481  [
482  odl,
483  uuid(4ab61e25-c09f-4239-8f7f-7a018ea0199f),
484  dual
485  ]
486  interface ItestIF5 : ItestIF2
487  {
488  [id(0x1234)] HRESULT fn4([in] int a);
489  [id(0x1235)] HRESULT fn5([in] int a);
490  }
491 
492  [
493  odl,
494  uuid(ec236d8e-2cc7-44f2-b394-36c86ff3da74)
495  ]
496  interface ItestIF6 : IDispatch
497  {
498  [id(0x1234)] HRESULT fn4([in] int a);
499  [id(0x1235)] HRESULT fn5([in] int a);
500  }
501 
502  [
503  odl,
504  uuid(f711b105-554d-4751-818c-46fcc5d7c0d5),
505  dual
506  ]
507  interface ItestIF7 : ItestIF6
508  {
509  [id(0x1236)] HRESULT fn6([in] GUID a);
510  }
511 
512  [
513  odl,
514  uuid(bdfa260b-ef40-43d3-b071-cddec919f132)
515  ]
516  interface ItestIF8
517  {
518  HRESULT fn1([in] int x);
519  HRESULT fn2([out,retval] int *x);
520  }
521 
522  [
523  odl,
524  uuid(51033a23-dc37-4f19-aa34-4d8a670458a0)
525 
526  ]
527  interface ItestIF9 : ItestIF8
528  {
529  HRESULT fn3([in] int y);
530  }
531 
532  [
533  odl,
534  uuid(2e8f14fe-0bce-42f0-8b7d-3af8393c7967)
535  ]
536  dispinterface ItestIF10
537  {
538  interface ItestIF9;
539  }
540 
541  [
542  odl,
543  uuid(7d9e9371-482e-4944-9b19-511fc705236f)
544  ]
545  dispinterface ItestIF11
546  {
547  interface ItestIF7;
548  }
549 
550 };
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
disp
Definition: i386-dis.c:3181
#define f3(x, y, z)
Definition: sha1.c:32
static const struct update_accum a3
Definition: msg.c:600
Definition: userinit.h:56
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
static const BYTE us[]
Definition: encode.c:689
coclass SHDocVw::ShellWindows dual
Definition: exdisp.idl:631
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT ui
Definition: oleauto.h:49
typedef helpstring
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:5666
unsigned long OLE_COLOR
Definition: olepro.idl:37
IWidget_dispids
Definition: tmarshal.idl:25
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define test
Definition: rosglue.h:37
OLECHAR * BSTR
Definition: compat.h:1934
FT_Library library
Definition: cffdrivr.c:654
int32_t INT
Definition: typedefs.h:56
& rect
Definition: startmenu.cpp:1413
INT64 hyper
Definition: rpcndr.h:117
static ItestDual TestDual
Definition: tmarshal.c:233
coclass TestTypelib::Coclass3 oleautomation
Definition: tmarshal.idl:199
static ITestSecondIface TestSecondIface
Definition: tmarshal.c:262
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
coclass TestTypelib::Coclass3 uuid(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586)
struct tagSAFEARRAY SAFEARRAY
struct TestTypelib::tagMYSTRUCT MYSTRUCT
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum const GLfloat * params
Definition: glext.h:5645
#define a
Definition: ke_i.h:78
#define e
Definition: ke_i.h:82
static size_t double number
Definition: printf.c:64
static PVOID ptr
Definition: dispmode.c:27
struct NameRec_ * Name
Definition: cdprocs.h:464
GLdouble GLdouble z
Definition: glext.h:5874
static const WCHAR version[]
Definition: asmname.c:64
UCHAR ab[sizeof("Hello World!") -1]
Definition: fdi.c:114
Definition: msg.h:41
#define b
Definition: ke_i.h:79
GLuint GLfloat * val
Definition: glext.h:7180
GLfloat f
Definition: glext.h:7540
#define d
Definition: ke_i.h:81
LONG HRESULT
Definition: typedefs.h:77
uint64_t ULONGLONG
Definition: typedefs.h:65
const GLubyte * c
Definition: glext.h:8905
static FILE * out
Definition: regtests2xml.c:44
BOOL Error
Definition: chkdsk.c:66
coclass TestTypelib::Coclass3 odl
static int state
Definition: maze.c:121
INonOleAutomation_dispids
Definition: tmarshal.idl:78
uint32_t entry
Definition: isohybrid.c:63
GLdouble s
Definition: gl.h:2039
importlib("stdole2.tlb")
enum State_ State
Definition: pofuncs.h:54
GLuint in
Definition: glext.h:9616
GLsizei GLsizei GLchar * source
Definition: glext.h:6048
struct _STATE STATE
static const int DISPID_TM_NEG_RESTRICTED
Definition: tmarshal.idl:76
unsigned int UINT
Definition: ndis.h:50
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
Definition: name.c:36
GLenum GLuint id
Definition: glext.h:5579
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
GLfloat GLfloat p
Definition: glext.h:8902
int f2(S1 &, S2 &)
GLuint64EXT * result
Definition: glext.h:11304
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum GLdouble GLenum GLint GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLenum GLfloat GLenum GLfloat GLenum GLushort const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLenum GLint GLenum GLint GLenum GLint GLuint GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble const GLfloat GLenum const GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLint GLint GLsizei GLsizei GLenum GLuint GLenum array
Definition: glfuncs.h:320