oleaut32: Get rid of some magic offset values, use structure for that.
[wine/multimedia.git] / dlls / oleaut32 / typelib.h
blob210db33f1bd91704e18558e29c0c88a97016344e
1 /*
2 * typelib.h internal wine data structures
3 * used to decode typelib's
5 * Copyright 1999 Rein KLazes
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef _WINE_TYPELIB_H
22 #define _WINE_TYPELIB_H
24 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "oleauto.h"
30 #define HELPDLLFLAG (0x0100)
31 #define DO_NOT_SEEK (-1)
33 #define MSFT_HREFTYPE_INTHISFILE(href) (!((href) & 3))
34 #define MSFT_HREFTYPE_INDEX(href) ((href) /sizeof(MSFT_TypeInfoBase))
36 /*-------------------------FILE STRUCTURES-----------------------------------*/
38 /* There are two known file formats, those created with ICreateTypeLib
39 * have the signature "SLTG" as their first four bytes, while those created
40 * with ICreateTypeLib2 have "MSFT".
43 /*****************************************************
44 * MSFT typelibs
46 * These are TypeLibs created with ICreateTypeLib2
51 * structure of the typelib type2 header
52 * it is at the beginning of a type lib file
56 #define MSFT_SIGNATURE 0x5446534D /* "MSFT" */
58 typedef struct tagMSFT_Header {
59 /*0x00*/INT magic1; /* 0x5446534D "MSFT" */
60 INT magic2; /* 0x00010002 version nr? */
61 INT posguid; /* position of libid in guid table */
62 /* (should be, else -1) */
63 INT lcid; /* locale id */
64 /*0x10*/INT lcid2;
65 INT varflags; /* (largely) unknown flags ,seems to be always 41 */
66 /* becomes 0x51 with a helpfile defined */
67 /* if help dll defined it's 0x151 */
68 /* update : the lower nibble is syskind */
69 INT version; /* set with SetVersion() */
70 INT flags; /* set with SetFlags() */
71 /*0x20*/INT nrtypeinfos; /* number of typeinfo's (till so far) */
72 INT helpstring; /* position of help string in stringtable */
73 INT helpstringcontext;
74 INT helpcontext;
75 /*0x30*/INT nametablecount; /* number of names in name table */
76 INT nametablechars; /* nr of characters in name table */
77 INT NameOffset; /* offset of name in name table */
78 INT helpfile; /* position of helpfile in stringtable */
79 /*0x40*/INT CustomDataOffset; /* if -1 no custom data, else it is offset */
80 /* in customer data/guid offset table */
81 INT res44; /* unknown always: 0x20 (guid hash size?) */
82 INT res48; /* unknown always: 0x80 (name hash size?) */
83 INT dispatchpos; /* HREFTYPE to IDispatch, or -1 if no IDispatch */
84 /*0x50*/INT nimpinfos; /* number of impinfos */
85 } MSFT_Header;
87 /* segments in the type lib file have a structure like this: */
88 typedef struct tagMSFT_pSeg {
89 INT offset; /* absolute offset in file */
90 INT length; /* length of segment */
91 INT res08; /* unknown always -1 */
92 INT res0c; /* unknown always 0x0f in the header */
93 /* 0x03 in the typeinfo_data */
94 } MSFT_pSeg;
96 /* layout of the main segment directory */
97 typedef struct tagMSFT_SegDir {
98 /*1*/MSFT_pSeg pTypeInfoTab; /* each type info get an entry of 0x64 bytes */
99 /* (25 ints) */
100 /*2*/MSFT_pSeg pImpInfo; /* table with info for imported types */
101 /*3*/MSFT_pSeg pImpFiles; /* import libraries */
102 /*4*/MSFT_pSeg pRefTab; /* References table */
103 /*5*/MSFT_pSeg pLibtab; /* always exists, always same size (0x80) */
104 /* hash table w offsets to guid????? */
105 /*6*/MSFT_pSeg pGuidTab; /* all guids are stored here together with */
106 /* offset in some table???? */
107 /*7*/MSFT_pSeg res07; /* always created, always same size (0x200) */
108 /* purpose largely unknown */
109 /*8*/MSFT_pSeg pNametab; /* name tables */
110 /*9*/MSFT_pSeg pStringtab; /* string table */
111 /*A*/MSFT_pSeg pTypdescTab; /* table with type descriptors */
112 /*B*/MSFT_pSeg pArrayDescriptions;
113 /*C*/MSFT_pSeg pCustData; /* data table, used for custom data and default */
114 /* parameter values */
115 /*D*/MSFT_pSeg pCDGuids; /* table with offsets for the guids and into */
116 /* the customer data table */
117 /*E*/MSFT_pSeg res0e; /* unknown */
118 /*F*/MSFT_pSeg res0f; /* unknown */
119 } MSFT_SegDir;
122 /* base type info data */
123 typedef struct tagMSFT_TypeInfoBase {
124 /*000*/ INT typekind; /* it is the TKIND_xxx */
125 /* some byte alignment stuff */
126 INT memoffset; /* points past the file, if no elements */
127 INT res2; /* zero if no element, N*0x40 */
128 INT res3; /* -1 if no element, (N-1)*0x38 */
129 /*010*/ INT res4; /* always? 3 */
130 INT res5; /* always? zero */
131 INT cElement; /* counts elements, HI=cVars, LO=cFuncs */
132 INT res7; /* always? zero */
133 /*020*/ INT res8; /* always? zero */
134 INT res9; /* always? zero */
135 INT resA; /* always? zero */
136 INT posguid; /* position in guid table */
137 /*030*/ INT flags; /* Typeflags */
138 INT NameOffset; /* offset in name table */
139 INT version; /* element version */
140 INT docstringoffs; /* offset of docstring in string tab */
141 /*040*/ INT helpstringcontext; /* */
142 INT helpcontext; /* */
143 INT oCustData; /* offset in customer data table */
144 #ifdef WORDS_BIGENDIAN
145 INT16 cbSizeVft; /* virtual table size, not including inherits */
146 INT16 cImplTypes; /* nr of implemented interfaces */
147 #else
148 INT16 cImplTypes; /* nr of implemented interfaces */
149 INT16 cbSizeVft; /* virtual table size, not including inherits */
150 #endif
151 /*050*/ INT size; /* size in bytes, at least for structures */
152 /* FIXME: name of this field */
153 INT datatype1; /* position in type description table */
154 /* or in base interfaces */
155 /* if coclass: offset in reftable */
156 /* if interface: reference to inherited if */
157 /* if module: offset to dllname in name table */
158 INT datatype2; /* if 0x8000, entry above is valid */
159 /* actually dunno */
160 /* else it is zero? */
161 /* if interface: inheritance level | no of inherited funcs */
162 INT res18; /* always? 0 */
163 /*060*/ INT res19; /* always? -1 */
164 } MSFT_TypeInfoBase;
166 /* layout of an entry with information on imported types */
167 typedef struct tagMSFT_ImpInfo {
168 INT flags; /* bits 0 - 15: count */
169 /* bit 16: if set oGuid is an offset to Guid */
170 /* if clear oGuid is a typeinfo index in the specified typelib */
171 /* bits 24 - 31: TKIND of reference */
172 INT oImpFile; /* offset in the Import File table */
173 INT oGuid; /* offset in Guid table or typeinfo index (see bit 16 of res0) */
174 } MSFT_ImpInfo;
176 #define MSFT_IMPINFO_OFFSET_IS_GUID 0x00010000
178 /* function description data */
179 typedef struct {
180 /* INT recsize; record size including some xtra stuff */
181 INT DataType; /* data type of the member, eg return of function */
182 INT Flags; /* something to do with attribute flags (LOWORD) */
183 #ifdef WORDS_BIGENDIAN
184 INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
185 INT16 VtableOffset; /* offset in vtable */
186 #else
187 INT16 VtableOffset; /* offset in vtable */
188 INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
189 #endif
190 INT FKCCIC; /* bit string with the following */
191 /* meaning (bit 0 is the msb): */
192 /* bit 2 indicates that oEntry is numeric */
193 /* bit 3 that parameter has default values */
194 /* calling convention (bits 4-7 ) */
195 /* bit 8 indicates that custom data is present */
196 /* Invocation kind (bits 9-12 ) */
197 /* function kind (eg virtual), bits 13-15 */
198 #ifdef WORDS_BIGENDIAN
199 INT16 nroargs; /* nr of optional arguments */
200 INT16 nrargs; /* number of arguments (including optional ????) */
201 #else
202 INT16 nrargs; /* number of arguments (including optional ????) */
203 INT16 nroargs; /* nr of optional arguments */
204 #endif
205 /* optional attribute fields, the number of them is variable */
206 INT OptAttr[1];
208 0* INT helpcontext;
209 1* INT oHelpString;
210 2* INT oEntry; // either offset in string table or numeric as it is //
211 3* INT res9; // unknown (-1) //
212 4* INT resA; // unknown (-1) //
213 5* INT HelpStringContext;
214 // these are controlled by a bit set in the FKCCIC field //
215 6* INT oCustData; // custom data for function //
216 7* INT oArgCustData[1]; // custom data per argument //
218 } MSFT_FuncRecord;
220 /* after this may follow an array with default value pointers if the
221 * appropriate bit in the FKCCIC field has been set:
222 * INT oDefautlValue[nrargs];
225 /* Parameter info one per argument*/
226 typedef struct {
227 INT DataType;
228 INT oName;
229 INT Flags;
230 } MSFT_ParameterInfo;
232 /* Variable description data */
233 typedef struct {
234 INT Info; /* record size including some extra stuff */
235 INT DataType; /* data type of the variable */
236 INT Flags; /* VarFlags (LOWORD) */
237 #ifdef WORDS_BIGENDIAN
238 INT16 vardescsize; /* size of reconstituted VARDESC and related structs */
239 INT16 VarKind; /* VarKind */
240 #else
241 INT16 VarKind; /* VarKind */
242 INT16 vardescsize; /* size of reconstituted VARDESC and related structs */
243 #endif
244 INT OffsValue; /* value of the variable or the offset */
245 /* in the data structure */
246 /* optional attribute fields, the number of them is variable */
247 /* controlled by record length */
248 INT HelpContext;
249 INT oHelpString;
250 INT res9; /* unknown (-1) */
251 INT oCustData; /* custom data for variable */
252 INT HelpStringContext;
253 } MSFT_VarRecord;
255 /* Structure of the reference data */
256 typedef struct {
257 INT reftype; /* either offset in type info table, then it's */
258 /* a multiple of 64 */
259 /* or offset in the external reference table */
260 /* with an offset of 1 */
261 INT flags;
262 INT oCustData; /* custom data */
263 INT onext; /* next offset, -1 if last */
264 } MSFT_RefRecord;
266 /* this is how a guid is stored */
267 typedef struct {
268 GUID guid;
269 INT hreftype; /* -2 for the typelib guid, typeinfo offset
270 for typeinfo guid, low two bits are 01 if
271 this is an imported typeinfo, low two bits
272 are 10 if this is an imported typelib (used
273 by imported typeinfos) */
274 INT next_hash; /* offset to next guid in the hash bucket */
275 } MSFT_GuidEntry;
276 /* some data preceding entries in the name table */
277 typedef struct {
278 INT hreftype; /* is -1 if name is for neither a typeinfo,
279 a variable, or a function (that is, name
280 is for a typelib or a function parameter).
281 otherwise is the offset of the first
282 typeinfo that this name refers to (either
283 to the typeinfo itself or to a member of
284 the typeinfo */
285 INT next_hash; /* offset to next name in the hash bucket */
286 INT namelen; /* only lower 8 bits are valid,
287 lower-middle 8 bits are unknown (flags?),
288 upper 16 bits are hash code */
289 } MSFT_NameIntro;
290 /* the custom data table directory has entries like this */
291 typedef struct {
292 INT GuidOffset;
293 INT DataOffset;
294 INT next; /* next offset in the table, -1 if it's the last */
295 } MSFT_CDGuid;
298 /***********************************************************
300 * SLTG typelibs.
302 * These are created with ICreateTypeLib
306 #include "pshpack1.h"
308 typedef struct {
309 /*00*/ DWORD SLTG_magic; /* 0x47544c53 == "SLTG" */
310 /*04*/ WORD nrOfFileBlks; /* no of SLTG_BlkEntry's + 1 */
311 /*06*/ WORD res06; /* ?? always 9 */
312 /*08*/ WORD res08; /* some kind of len/offset ?? */
313 /*0a*/ WORD first_blk; /* 1 based index into blk entries that
314 corresponds to first block in file */
315 /*0c*/ DWORD res0c; /* always 0x000204ff */
316 /*10*/ DWORD res10; /* always 0x00000000 */
317 /*14*/ DWORD res14; /* always 0x000000c0 */
318 /*18*/ DWORD res18; /* always 0x46000000 */
319 /*1c*/ DWORD res1c; /* always 0x00000044 */
320 /*20*/ DWORD res20; /* always 0xffff0000 */
321 } SLTG_Header;
323 /* This gets followed by a list of block entries */
324 typedef struct {
325 /*00*/ DWORD len;
326 /*04*/ WORD index_string; /* offs from start of SLTG_Magic to index string */
327 /*06*/ WORD next;
328 } SLTG_BlkEntry;
330 /* The order of the blocks in the file is given by starting at Block
331 entry firt_blk and stepping through using the next pointer */
333 /* These then get followed by this magic */
334 typedef struct {
335 /*00*/ BYTE res00; /* always 0x01 */
336 /*01*/ CHAR CompObj_magic[8]; /* always "CompObj" */
337 /*09*/ CHAR dir_magic[4]; /* always "dir" */
338 } SLTG_Magic;
340 #define SLTG_COMPOBJ_MAGIC "CompObj"
341 #define SLTG_DIR_MAGIC "dir"
343 /* Next we have SLTG_Header.nrOfFileBlks - 2 of Index strings. These
344 are presumably unique to within the file and look something like
345 "AAAAAAAAAA" with the first character incremented from 'A' to ensure
346 uniqueness. I guess successive chars increment when we need to wrap
347 the first one. */
349 typedef struct {
350 /*00*/ CHAR string[11];
351 } SLTG_Index;
354 /* This is followed by SLTG_pad9 */
355 typedef struct {
356 /*00*/ CHAR pad[9]; /* 9 '\0's */
357 } SLTG_Pad9;
360 /* Now we have the noOfFileBlks - 1 worth of blocks. The length of
361 each block is given by its entry in SLTG_BlkEntry. */
363 /* type SLTG_NAME in rather like a BSTR except that the length in
364 bytes is given by the first WORD and the string contains 8bit chars */
366 typedef WORD SLTG_Name;
368 /* The main library block looks like this. This one seems to come last */
370 typedef struct {
371 /*00*/ WORD magic; /* 0x51cc */
372 /*02*/ WORD res02; /* 0x0003, 0x0004 */
373 /*04*/ WORD name; /* offset to name in name table */
374 /*06*/ SLTG_Name res06; /* maybe this is just WORD == 0xffff */
375 SLTG_Name helpstring;
376 SLTG_Name helpfile;
377 DWORD helpcontext;
378 WORD syskind; /* == 1 for win32, 0 for win16 */
379 WORD lcid; /* == 0x409, 0x809 etc */
380 DWORD res12; /* == 0 */
381 WORD libflags; /* LIBFLAG_* */
382 WORD maj_vers;
383 WORD min_vers;
384 GUID uuid;
385 } SLTG_LibBlk;
387 #define SLTG_LIBBLK_MAGIC 0x51cc
389 /* we then get 0x40 bytes worth of 0xffff or small numbers followed by
390 nrOfFileBlks - 2 of these */
391 typedef struct {
392 WORD small_no;
393 SLTG_Name index_name; /* This refers to a name in the directory */
394 SLTG_Name other_name; /* Another one of these weird names */
395 WORD res1a; /* 0xffff */
396 WORD name_offs; /* offset to name in name table */
397 WORD more_bytes; /* if this is non-zero we get this many
398 bytes before the next element, which seem
399 to reference the docstring of the type ? */
400 WORD res20; /* 0xffff */
401 DWORD helpcontext;
402 WORD res26; /* 0xffff */
403 GUID uuid;
404 } SLTG_OtherTypeInfo;
406 /* Next we get WORD 0x0003 followed by a DWORD which if we add to
407 0x216 gives the offset to the name table from the start of the LibBlk
408 struct */
410 typedef struct {
411 /*00*/ WORD magic; /* 0x0501 */
412 /*02*/ DWORD href_table; /* if not 0xffffffff, then byte offset from
413 beginning of struct to href table */
414 /*06*/ DWORD res06; /* 0xffffffff */
415 /*0a*/ DWORD elem_table; /* offset to members */
416 /*0e*/ DWORD res0e; /* 0xffffffff */
417 /*12*/ WORD major_version; /* major version number */
418 /*14*/ WORD minor_version; /* minor version number */
419 /*16*/ DWORD res16; /* 0xfffe0000 or 0xfffc0000 (on dual interfaces?) */
420 /*1a*/ BYTE typeflags1;/* 0x02 | top 5 bits hold l5sbs of TYPEFLAGS */
421 /*1b*/ BYTE typeflags2;/* TYPEFLAGS >> 5 */
422 /*1c*/ BYTE typeflags3;/* 0x02*/
423 /*1d*/ BYTE typekind; /* 0x03 == TKIND_INTERFACE etc. */
424 /*1e*/ DWORD res1e; /* 0x00000000 or 0xffffffff */
425 } SLTG_TypeInfoHeader;
427 #define SLTG_TIHEADER_MAGIC 0x0501
429 typedef struct {
430 /*00*/ WORD cFuncs;
431 /*02*/ WORD cVars;
432 /*04*/ WORD cImplTypes;
433 /*06*/ WORD res06; /* always 0000 */
434 /*08*/ WORD funcs_off; /* offset to functions (starting from the member header) */
435 /*0a*/ WORD vars_off; /* offset to vars (starting from the member header) */
436 /*0c*/ WORD impls_off; /* offset to implemented types (starting from the member header) */
437 /*0e*/ WORD funcs_bytes; /* bytes used by function data */
438 /*10*/ WORD vars_bytes; /* bytes used by var data */
439 /*12*/ WORD impls_bytes; /* bytes used by implemented type data */
440 /*14*/ WORD tdescalias_vt; /* for TKIND_ALIAS */
441 /*16*/ WORD res16; /* always ffff */
442 /*18*/ WORD res18; /* always 0000 */
443 /*1a*/ WORD res1a; /* always 0000 */
444 /*1c*/ WORD simple_alias; /* tdescalias_vt is a vt rather than an offset? */
445 /*1e*/ WORD res1e; /* always 0000 */
446 /*20*/ WORD cbSizeInstance;
447 /*22*/ WORD cbAlignment;
448 /*24*/ WORD res24;
449 /*26*/ WORD res26;
450 /*28*/ WORD cbSizeVft;
451 /*2a*/ WORD res2a; /* always ffff */
452 /*2c*/ WORD res2c; /* always ffff */
453 /*2e*/ WORD res2e; /* always ffff */
454 /*30*/ WORD res30; /* always ffff */
455 /*32*/ WORD res32;
456 /*34*/ WORD res34;
457 } SLTG_TypeInfoTail;
459 typedef struct {
460 /*00*/ WORD res00; /* 0x0001 sometimes 0x0003 ?? */
461 /*02*/ WORD res02; /* 0xffff */
462 /*04*/ BYTE res04; /* 0x01 */
463 /*05*/ DWORD cbExtra; /* No of bytes that follow */
464 } SLTG_MemberHeader;
466 typedef struct {
467 /*00*/ WORD magic; /* 0x120a */
468 /*02*/ WORD next; /* offset in bytes to next block from start of block
469 group, 0xffff if last item */
470 /*04*/ WORD name; /* offset to name within name table */
471 /*06*/ WORD value; /* offset to value from start of block group */
472 /*08*/ WORD res08; /* 0x56 */
473 /*0a*/ DWORD memid; /* memid */
474 /*0e*/ WORD helpcontext;/* 0xfffe == no context, 0x0001 == stored in EnumInfo struct, else offset
475 to value from start of block group */
476 /*10*/ WORD helpstring;/* offset from start of block group to string offset */
477 } SLTG_EnumItem;
479 #define SLTG_ENUMITEM_MAGIC 0x120a
481 typedef struct {
482 BYTE magic; /* 0x4c, 0xcb or 0x8b with optional SLTG_FUNCTION_FLAGS_PRESENT flag */
483 BYTE inv; /* high nibble is INVOKE_KIND, low nibble = 2 */
484 WORD next; /* byte offset from beginning of group to next fn */
485 WORD name; /* Offset within name table to name */
486 DWORD dispid; /* dispid */
487 WORD helpcontext; /* helpcontext (again 1 is special) */
488 WORD helpstring;/* helpstring offset to offset */
489 WORD arg_off; /* offset to args from start of block */
490 BYTE nacc; /* lowest 3bits are CALLCONV, rest are no of args */
491 BYTE retnextopt;/* if 0x80 bit set ret type follows else next WORD
492 is offset to ret type. No of optional args is
493 middle 6 bits */
494 WORD rettype; /* return type VT_?? or offset to ret type */
495 WORD vtblpos; /* position in vtbl? */
496 WORD funcflags; /* present if magic & 0x20 */
497 /* Param list starts, repeat next two as required */
498 #if 0
499 WORD name; /* offset to 2nd letter of name */
500 WORD+ type; /* VT_ of param */
501 #endif
502 } SLTG_Function;
504 #define SLTG_FUNCTION_FLAGS_PRESENT 0x20
505 #define SLTG_FUNCTION_MAGIC 0x4c
506 #define SLTG_DISPATCH_FUNCTION_MAGIC 0xcb
507 #define SLTG_STATIC_FUNCTION_MAGIC 0x8b
509 typedef struct {
510 /*00*/ BYTE magic; /* 0xdf */
511 /*01*/ BYTE res01; /* 0x00 */
512 /*02*/ DWORD res02; /* 0xffffffff */
513 /*06*/ DWORD res06; /* 0xffffffff */
514 /*0a*/ DWORD res0a; /* 0xffffffff */
515 /*0e*/ DWORD res0e; /* 0xffffffff */
516 /*12*/ DWORD res12; /* 0xffffffff */
517 /*16*/ DWORD res16; /* 0xffffffff */
518 /*1a*/ DWORD res1a; /* 0xffffffff */
519 /*1e*/ DWORD res1e; /* 0xffffffff */
520 /*22*/ DWORD res22; /* 0xffffffff */
521 /*26*/ DWORD res26; /* 0xffffffff */
522 /*2a*/ DWORD res2a; /* 0xffffffff */
523 /*2e*/ DWORD res2e; /* 0xffffffff */
524 /*32*/ DWORD res32; /* 0xffffffff */
525 /*36*/ DWORD res36; /* 0xffffffff */
526 /*3a*/ DWORD res3a; /* 0xffffffff */
527 /*3e*/ DWORD res3e; /* 0xffffffff */
528 /*42*/ WORD res42; /* 0xffff */
529 /*44*/ DWORD number; /* this is 8 times the number of refs */
530 /*48*/ /* Now we have number bytes (8 for each ref) of SLTG_UnknownRefInfo */
532 /*50*/ WORD res50; /* 0xffff */
533 /*52*/ BYTE res52; /* 0x01 */
534 /*53*/ DWORD res53; /* 0x00000000 */
535 /*57*/ SLTG_Name names[1];
536 /* Now we have number/8 SLTG_Names (first WORD is no of bytes in the ascii
537 * string). Strings look like "*\Rxxxx*#n". If xxxx == ffff then the
538 * ref refers to the nth type listed in this library (0 based). Else
539 * the xxxx (which maybe fewer than 4 digits) is the offset into the name
540 * table to a string "*\G{<guid>}#1.0#0#C:\WINNT\System32\stdole32.tlb#"
541 * The guid is the typelib guid; the ref again refers to the nth type of
542 * the imported typelib.
545 /*xx*/ BYTE resxx; /* 0xdf */
547 } SLTG_RefInfo;
549 #define SLTG_REF_MAGIC 0xdf
551 typedef struct {
552 WORD res00; /* 0x0001 */
553 BYTE res02; /* 0x02 */
554 BYTE res03; /* 0x40 if internal ref, 0x00 if external ? */
555 WORD res04; /* 0xffff */
556 WORD res06; /* 0x0000, 0x0013 or 0xffff ?? */
557 } SLTG_UnknownRefInfo;
559 typedef struct {
560 WORD res00; /* 0x004a */
561 WORD next; /* byte offs to next interface */
562 WORD res04; /* 0xffff */
563 BYTE impltypeflags; /* IMPLTYPEFLAG_* */
564 BYTE res07; /* 0x80 */
565 WORD res08; /* 0x0012, 0x0028 ?? */
566 WORD ref; /* number in ref table ? */
567 WORD res0c; /* 0x4000 */
568 WORD res0e; /* 0xfffe */
569 WORD res10; /* 0xffff */
570 WORD res12; /* 0x001d */
571 WORD pos_in_table; /* 0x0, 0x4, ? */
572 } SLTG_ImplInfo;
574 #define SLTG_IMPL_MAGIC 0x004a
576 typedef struct {
577 BYTE magic; /* 0x0a */
578 BYTE flags;
579 WORD next;
580 WORD name;
581 WORD byte_offs; /* pos in struct, or offset to const type or const data (if flags & 0x08) */
582 WORD type; /* if flags & 0x02 this is the type, else offset to type */
583 DWORD memid;
584 WORD helpcontext; /* ?? */
585 WORD helpstring; /* ?? */
586 WORD varflags; /* only present if magic & 0x02 */
587 } SLTG_Variable;
589 #define SLTG_VAR_MAGIC 0x0a
590 #define SLTG_VAR_WITH_FLAGS_MAGIC 0x2a
593 /* CARRAYs look like this
594 WORD type == VT_CARRAY
595 WORD offset from start of block to SAFEARRAY
596 WORD typeofarray
599 #include "poppack.h"
601 HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const FUNCDESC **ppFuncDesc );
603 extern DWORD _invoke(FARPROC func,CALLCONV callconv, int nrargs, DWORD *args);
605 HRESULT TMARSHAL_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv);
607 /* The OLE Automation ProxyStub Interface Class (aka Typelib Marshaler) */
608 DEFINE_OLEGUID( CLSID_PSDispatch, 0x00020420, 0x0000, 0x0000 );
609 DEFINE_OLEGUID( CLSID_PSEnumVariant, 0x00020421, 0x0000, 0x0000 );
610 DEFINE_OLEGUID( CLSID_PSTypeInfo, 0x00020422, 0x0000, 0x0000 );
611 DEFINE_OLEGUID( CLSID_PSTypeLib, 0x00020423, 0x0000, 0x0000 );
612 DEFINE_OLEGUID( CLSID_PSOAInterface, 0x00020424, 0x0000, 0x0000 );
613 DEFINE_OLEGUID( CLSID_PSTypeComp, 0x00020425, 0x0000, 0x0000 );
615 /*---------------------------END--------------------------------------------*/
616 #endif