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