ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

typelib.h
Go to the documentation of this file.
00001 /*
00002  * typelib.h  internal wine data structures
00003  * used to decode typelib's
00004  *
00005  * Copyright 1999 Rein KLazes
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00020  */
00021 #ifndef _WINE_TYPELIB_H
00022 #define _WINE_TYPELIB_H
00023 
00024 #include <stdarg.h>
00025 
00026 #include "windef.h"
00027 #include "winbase.h"
00028 #include "oleauto.h"
00029 
00030 #define HELPDLLFLAG (0x0100)
00031 #define DO_NOT_SEEK (-1)
00032 
00033 #define MSFT_HREFTYPE_INTHISFILE(href) (!((href) & 3))
00034 #define MSFT_HREFTYPE_INDEX(href) ((href) /sizeof(MSFT_TypeInfoBase))
00035 
00036 /*-------------------------FILE STRUCTURES-----------------------------------*/
00037 
00038 /* There are two known file formats, those created with ICreateTypeLib
00039  * have the signature "SLTG" as their first four bytes, while those created
00040  * with ICreateTypeLib2 have "MSFT".
00041  */
00042 
00043 /*****************************************************
00044  *                MSFT typelibs
00045  *
00046  * These are TypeLibs created with ICreateTypeLib2
00047  *
00048  */
00049 
00050 /*
00051  * structure of the typelib type2 header
00052  * it is at the beginning of a type lib file
00053  *
00054  */
00055 typedef struct tagMSFT_Header {
00056 /*0x00*/INT magic1;       /* 0x5446534D "MSFT" */
00057         INT   magic2;       /* 0x00010002 version nr? */
00058         INT   posguid;      /* position of libid in guid table  */
00059                             /* (should be,  else -1) */
00060         INT   lcid;         /* locale id */
00061 /*0x10*/INT   lcid2;
00062         INT   varflags;     /* (largely) unknown flags ,seems to be always 41 */
00063                             /* becomes 0x51 with a helpfile defined */
00064                             /* if help dll defined it's 0x151 */
00065                             /* update : the lower nibble is syskind */
00066         INT   version;      /* set with SetVersion() */
00067         INT   flags;        /* set with SetFlags() */
00068 /*0x20*/INT   nrtypeinfos;  /* number of typeinfo's (till so far) */
00069         INT   helpstring;   /* position of help string in stringtable */
00070         INT   helpstringcontext;
00071         INT   helpcontext;
00072 /*0x30*/INT   nametablecount;   /* number of names in name table */
00073         INT   nametablechars;   /* nr of characters in name table */
00074         INT   NameOffset;       /* offset of name in name table */
00075         INT   helpfile;         /* position of helpfile in stringtable */
00076 /*0x40*/INT   CustomDataOffset; /* if -1 no custom data, else it is offset */
00077                                 /* in customer data/guid offset table */
00078         INT   res44;            /* unknown always: 0x20 (guid hash size?) */
00079         INT   res48;            /* unknown always: 0x80 (name hash size?) */
00080         INT   dispatchpos;      /* HREFTYPE to IDispatch, or -1 if no IDispatch */
00081 /*0x50*/INT   nimpinfos;        /* number of impinfos */
00082 } MSFT_Header;
00083 
00084 /* segments in the type lib file have a structure like this: */
00085 typedef struct tagMSFT_pSeg {
00086         INT   offset;       /* absolute offset in file */
00087         INT   length;       /* length of segment */
00088         INT   res08;        /* unknown always -1 */
00089         INT   res0c;        /* unknown always 0x0f in the header */
00090                             /* 0x03 in the typeinfo_data */
00091 } MSFT_pSeg;
00092 
00093 /* layout of the main segment directory */
00094 typedef struct tagMSFT_SegDir {
00095 /*1*/MSFT_pSeg pTypeInfoTab; /* each type info get an entry of 0x64 bytes */
00096                              /* (25 ints) */
00097 /*2*/MSFT_pSeg pImpInfo;     /* table with info for imported types */
00098 /*3*/MSFT_pSeg pImpFiles;    /* import libraries */
00099 /*4*/MSFT_pSeg pRefTab;      /* References table */
00100 /*5*/MSFT_pSeg pLibtab;      /* always exists, always same size (0x80) */
00101                              /* hash table w offsets to guid????? */
00102 /*6*/MSFT_pSeg pGuidTab;     /* all guids are stored here together with  */
00103                              /* offset in some table???? */
00104 /*7*/MSFT_pSeg res07;        /* always created, always same size (0x200) */
00105                              /* purpose largely unknown */
00106 /*8*/MSFT_pSeg pNametab;     /* name tables */
00107 /*9*/MSFT_pSeg pStringtab;   /* string table */
00108 /*A*/MSFT_pSeg pTypdescTab;  /* table with type descriptors */
00109 /*B*/MSFT_pSeg pArrayDescriptions;
00110 /*C*/MSFT_pSeg pCustData;    /* data table, used for custom data and default */
00111                              /* parameter values */
00112 /*D*/MSFT_pSeg pCDGuids;     /* table with offsets for the guids and into */
00113                              /* the customer data table */
00114 /*E*/MSFT_pSeg res0e;        /* unknown */
00115 /*F*/MSFT_pSeg res0f;        /* unknown  */
00116 } MSFT_SegDir;
00117 
00118 
00119 /* base type info data */
00120 typedef struct tagMSFT_TypeInfoBase {
00121 /*000*/ INT   typekind;             /*  it is the TKIND_xxx */
00122                                     /* some byte alignment stuff */
00123         INT     memoffset;          /* points past the file, if no elements */
00124         INT     res2;               /* zero if no element, N*0x40 */
00125         INT     res3;               /* -1 if no element, (N-1)*0x38 */
00126 /*010*/ INT     res4;               /* always? 3 */
00127         INT     res5;               /* always? zero */
00128         INT     cElement;           /* counts elements, HI=cVars, LO=cFuncs */
00129         INT     res7;               /* always? zero */
00130 /*020*/ INT     res8;               /* always? zero */
00131         INT     res9;               /* always? zero */
00132         INT     resA;               /* always? zero */
00133         INT     posguid;            /* position in guid table */
00134 /*030*/ INT     flags;              /* Typeflags */
00135         INT     NameOffset;         /* offset in name table */
00136         INT     version;            /* element version */
00137         INT     docstringoffs;      /* offset of docstring in string tab */
00138 /*040*/ INT     helpstringcontext;  /*  */
00139         INT     helpcontext;    /* */
00140         INT     oCustData;          /* offset in customer data table */
00141 #ifdef WORDS_BIGENDIAN
00142         INT16   cbSizeVft;      /* virtual table size, not including inherits */
00143         INT16   cImplTypes;     /* nr of implemented interfaces */
00144 #else
00145         INT16   cImplTypes;     /* nr of implemented interfaces */
00146         INT16   cbSizeVft;      /* virtual table size, not including inherits */
00147 #endif
00148 /*050*/ INT     size;           /* size in bytes, at least for structures */
00149         /* FIXME: name of this field */
00150         INT     datatype1;      /* position in type description table */
00151                                 /* or in base interfaces */
00152                                 /* if coclass: offset in reftable */
00153                                 /* if interface: reference to inherited if */
00154                                 /* if module: offset to dllname in name table */
00155         INT     datatype2;      /* if 0x8000, entry above is valid */
00156                                 /* actually dunno */
00157                                 /* else it is zero? */
00158                                 /* if interface: inheritance level | no of inherited funcs */
00159         INT     res18;          /* always? 0 */
00160 /*060*/ INT     res19;          /* always? -1 */
00161 } MSFT_TypeInfoBase;
00162 
00163 /* layout of an entry with information on imported types */
00164 typedef struct tagMSFT_ImpInfo {
00165     INT     flags;          /* bits 0 - 15:  count */
00166                             /* bit  16:      if set oGuid is an offset to Guid */
00167                             /*               if clear oGuid is a typeinfo index in the specified typelib */
00168                             /* bits 24 - 31: TKIND of reference */
00169     INT     oImpFile;       /* offset in the Import File table */
00170     INT     oGuid;          /* offset in Guid table or typeinfo index (see bit 16 of res0) */
00171 } MSFT_ImpInfo;
00172 
00173 #define MSFT_IMPINFO_OFFSET_IS_GUID 0x00010000
00174 
00175 /* function description data */
00176 typedef struct {
00177 /*  INT   recsize;       record size including some xtra stuff */
00178     INT   DataType;     /* data type of the member, eg return of function */
00179     INT   Flags;        /* something to do with attribute flags (LOWORD) */
00180 #ifdef WORDS_BIGENDIAN
00181     INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
00182     INT16 VtableOffset; /* offset in vtable */
00183 #else
00184     INT16 VtableOffset; /* offset in vtable */
00185     INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
00186 #endif
00187     INT   FKCCIC;       /* bit string with the following  */
00188                         /* meaning (bit 0 is the msb): */
00189                         /* bit 2 indicates that oEntry is numeric */
00190                         /* bit 3 that parameter has default values */
00191                         /* calling convention (bits 4-7 ) */
00192                         /* bit 8 indicates that custom data is present */
00193                         /* Invocation kind (bits 9-12 ) */
00194                         /* function kind (eg virtual), bits 13-15  */
00195 #ifdef WORDS_BIGENDIAN
00196     INT16 nroargs;      /* nr of optional arguments */
00197     INT16 nrargs;       /* number of arguments (including optional ????) */
00198 #else
00199     INT16 nrargs;       /* number of arguments (including optional ????) */
00200     INT16 nroargs;      /* nr of optional arguments */
00201 #endif
00202     /* optional attribute fields, the number of them is variable */
00203     INT   OptAttr[1];
00204 /*
00205 0*  INT   helpcontext;
00206 1*  INT   oHelpString;
00207 2*  INT   oEntry;       // either offset in string table or numeric as it is //
00208 3*  INT   res9;         // unknown (-1) //
00209 4*  INT   resA;         // unknown (-1) //
00210 5*  INT   HelpStringContext;
00211     // these are controlled by a bit set in the FKCCIC field  //
00212 6*  INT   oCustData;        // custom data for function //
00213 7*  INT   oArgCustData[1];  // custom data per argument //
00214 */
00215 } MSFT_FuncRecord;
00216 
00217 /* after this may follow an array with default value pointers if the
00218  * appropriate bit in the FKCCIC field has been set:
00219  * INT   oDefautlValue[nrargs];
00220  */
00221 
00222     /* Parameter info one per argument*/
00223 typedef struct {
00224         INT   DataType;
00225         INT   oName;
00226         INT   Flags;
00227     } MSFT_ParameterInfo;
00228 
00229 /* Variable description data */
00230 typedef struct {
00231 /*  INT   recsize;      // record size including some xtra stuff */
00232     INT   DataType;     /* data type of the variable */
00233     INT   Flags;        /* VarFlags (LOWORD) */
00234 #ifdef WORDS_BIGENDIAN
00235     INT16 vardescsize;  /* size of reconstituted VARDESC and related structs */
00236     INT16 VarKind;      /* VarKind */
00237 #else
00238     INT16 VarKind;      /* VarKind */
00239     INT16 vardescsize;  /* size of reconstituted VARDESC and related structs */
00240 #endif
00241     INT   OffsValue;    /* value of the variable or the offset  */
00242                         /* in the data structure */
00243     /* optional attribute fields, the number of them is variable */
00244     /* controlled by record length */
00245     INT   HelpContext;
00246     INT   oHelpString;
00247     INT   res9;         /* unknown (-1) */
00248     INT   oCustData;        /* custom data for variable */
00249     INT   HelpStringContext;
00250 
00251 } MSFT_VarRecord;
00252 
00253 /* Structure of the reference data  */
00254 typedef struct {
00255     INT   reftype;  /* either offset in type info table, then it's */
00256                     /* a multiple of 64 */
00257                     /* or offset in the external reference table */
00258                     /* with an offset of 1 */
00259     INT   flags;
00260     INT   oCustData;    /* custom data */
00261     INT   onext;    /* next offset, -1 if last */
00262 } MSFT_RefRecord;
00263 
00264 /* this is how a guid is stored */
00265 typedef struct {
00266     GUID guid;
00267     INT   hreftype;     /* -2 for the typelib guid, typeinfo offset
00268                for typeinfo guid, low two bits are 01 if
00269                this is an imported typeinfo, low two bits
00270                are 10 if this is an imported typelib (used
00271                by imported typeinfos) */
00272     INT   next_hash;    /* offset to next guid in the hash bucket */
00273 } MSFT_GuidEntry;
00274 /* some data preceding entries in the name table */
00275 typedef struct {
00276     INT   hreftype;     /* is -1 if name is for neither a typeinfo,
00277                a variable, or a function (that is, name
00278                is for a typelib or a function parameter).
00279                otherwise is the offset of the first
00280                typeinfo that this name refers to (either
00281                to the typeinfo itself or to a member of
00282                the typeinfo */
00283     INT   next_hash;    /* offset to next name in the hash bucket */
00284     INT   namelen;      /* only lower 8 bits are valid,
00285                lower-middle 8 bits are unknown (flags?),
00286                upper 16 bits are hash code */
00287 } MSFT_NameIntro;
00288 /* the custom data table directory has entries like this */
00289 typedef struct {
00290     INT   GuidOffset;
00291     INT   DataOffset;
00292     INT   next;     /* next offset in the table, -1 if it's the last */
00293 } MSFT_CDGuid;
00294 
00295 
00296 /***********************************************************
00297  *
00298  *                SLTG typelibs.
00299  *
00300  * These are created with ICreateTypeLib
00301  *
00302  */
00303 
00304 #include "pshpack1.h"
00305 
00306 typedef struct {
00307 /*00*/  DWORD SLTG_magic;   /* 0x47544c53  == "SLTG" */
00308 /*04*/  WORD nrOfFileBlks;  /* no of SLTG_BlkEntry's + 1 */
00309 /*06*/  WORD res06;     /* ?? always 9 */
00310 /*08*/  WORD res08;             /* some kind of len/offset ?? */
00311 /*0a*/  WORD first_blk;     /* 1 based index into blk entries that
00312                    corresponds to first block in file */
00313 /*0c*/  DWORD res0c;        /* always 0x000204ff */
00314 /*10*/  DWORD res10;        /* always 0x00000000 */
00315 /*14*/  DWORD res14;        /* always 0x000000c0 */
00316 /*18*/  DWORD res18;        /* always 0x46000000 */
00317 /*1c*/  DWORD res1c;        /* always 0x00000044 */
00318 /*20*/  DWORD res20;        /* always 0xffff0000 */
00319 } SLTG_Header;
00320 
00321 /* This gets followed by a list of block entries */
00322 typedef struct {
00323 /*00*/  DWORD len;
00324 /*04*/  WORD index_string; /* offs from start of SLTG_Magic to index string */
00325 /*06*/  WORD next;
00326 } SLTG_BlkEntry;
00327 
00328 /* The order of the blocks in the file is given by starting at Block
00329    entry firt_blk and stepping through using the next pointer */
00330 
00331 /* These then get followed by this magic */
00332 typedef struct {
00333 /*00*/ BYTE res00;      /* always 0x01 */
00334 /*01*/ CHAR CompObj_magic[8];   /* always "CompObj" */
00335 /*09*/ CHAR dir_magic[4];   /* always "dir" */
00336 } SLTG_Magic;
00337 
00338 #define SLTG_COMPOBJ_MAGIC "CompObj"
00339 #define SLTG_DIR_MAGIC "dir"
00340 
00341 /* Next we have SLTG_Header.nrOfFileBlks - 2 of Index strings.  These
00342 are presumably unique to within the file and look something like
00343 "AAAAAAAAAA" with the first character incremented from 'A' to ensure
00344 uniqueness.  I guess successive chars increment when we need to wrap
00345 the first one. */
00346 
00347 typedef struct {
00348 /*00*/ CHAR string[11];
00349 } SLTG_Index;
00350 
00351 
00352 /* This is followed by SLTG_pad9 */
00353 typedef struct {
00354 /*00*/ CHAR pad[9]; /* 9 '\0's */
00355 } SLTG_Pad9;
00356 
00357 
00358 /* Now we have the noOfFileBlks - 1 worth of blocks. The length of
00359 each block is given by its entry in SLTG_BlkEntry. */
00360 
00361 /* type SLTG_NAME in rather like a BSTR except that the length in
00362 bytes is given by the first WORD and the string contains 8bit chars */
00363 
00364 typedef WORD SLTG_Name;
00365 
00366 /* The main library block looks like this.  This one seems to come last */
00367 
00368 typedef struct {
00369 /*00*/  WORD magic;     /* 0x51cc */
00370 /*02*/  WORD res02;     /* 0x0003, 0x0004 */
00371 /*04*/  WORD name;              /* offset to name in name table */
00372 /*06*/  SLTG_Name res06;    /* maybe this is just WORD == 0xffff */
00373     SLTG_Name helpstring;
00374     SLTG_Name helpfile;
00375     DWORD helpcontext;
00376     WORD syskind;       /* == 1 for win32, 0 for win16 */
00377     WORD lcid;      /* == 0x409, 0x809 etc */
00378     DWORD res12;        /* == 0 */
00379     WORD libflags;      /* LIBFLAG_* */
00380     WORD maj_vers;
00381     WORD min_vers;
00382     GUID uuid;
00383 } SLTG_LibBlk;
00384 
00385 #define SLTG_LIBBLK_MAGIC 0x51cc
00386 
00387 /* we then get 0x40 bytes worth of 0xffff or small numbers followed by
00388    nrOfFileBlks - 2 of these */
00389 typedef struct {
00390     WORD small_no;
00391     SLTG_Name index_name; /* This refers to a name in the directory */
00392     SLTG_Name other_name; /* Another one of these weird names */
00393     WORD res1a;       /* 0xffff */
00394     WORD name_offs;       /* offset to name in name table */
00395     WORD more_bytes;      /* if this is non-zero we get this many
00396                  bytes before the next element, which seem
00397                  to reference the docstring of the type ? */
00398     WORD res20;       /* 0xffff */
00399     DWORD helpcontext;
00400     WORD res26;       /* 0xffff */
00401         GUID uuid;
00402 } SLTG_OtherTypeInfo;
00403 
00404 /* Next we get WORD 0x0003 followed by a DWORD which if we add to
00405 0x216 gives the offset to the name table from the start of the LibBlk
00406 struct */
00407 
00408 typedef struct {
00409 /*00*/  WORD magic;     /* 0x0501 */
00410 /*02*/  DWORD href_table;   /* if not 0xffffffff, then byte offset from
00411                    beginning of struct to href table */
00412 /*06*/  DWORD res06;        /* 0xffffffff */
00413 /*0a*/  DWORD elem_table;   /* offset to members */
00414 /*0e*/  DWORD res0e;        /* 0xffffffff */
00415 /*12*/  WORD major_version; /* major version number */
00416 /*14*/  WORD minor_version; /* minor version number */
00417 /*16*/  DWORD res16;    /* 0xfffe0000 or 0xfffc0000 (on dual interfaces?) */
00418 /*1a*/  BYTE typeflags1;/* 0x02 | top 5 bits hold l5sbs of TYPEFLAGS */
00419 /*1b*/  BYTE typeflags2;/* TYPEFLAGS >> 5 */
00420 /*1c*/  BYTE typeflags3;/* 0x02*/
00421 /*1d*/  BYTE typekind;  /* 0x03 == TKIND_INTERFACE etc. */
00422 /*1e*/  DWORD res1e;    /* 0x00000000 or 0xffffffff */
00423 } SLTG_TypeInfoHeader;
00424 
00425 #define SLTG_TIHEADER_MAGIC 0x0501
00426 
00427 typedef struct {
00428 /*00*/  WORD cFuncs;
00429 /*02*/  WORD cVars;
00430 /*04*/  WORD cImplTypes;
00431 /*06*/  WORD res06; /* always 0000 */
00432 /*08*/  WORD funcs_off; /* offset to functions (starting from the member header) */
00433 /*0a*/  WORD vars_off; /* offset to vars (starting from the member header) */
00434 /*0c*/  WORD impls_off; /* offset to implemented types (starting from the member header) */
00435 /*0e*/  WORD funcs_bytes; /* bytes used by function data */
00436 /*10*/  WORD vars_bytes; /* bytes used by var data */
00437 /*12*/  WORD impls_bytes; /* bytes used by implemented type data */
00438 /*14*/  WORD tdescalias_vt; /* for TKIND_ALIAS */
00439 /*16*/  WORD res16; /* always ffff */
00440 /*18*/  WORD res18; /* always 0000 */
00441 /*1a*/  WORD res1a; /* always 0000 */
00442 /*1c*/  WORD simple_alias; /* tdescalias_vt is a vt rather than an offset? */
00443 /*1e*/  WORD res1e; /* always 0000 */
00444 /*20*/  WORD cbSizeInstance;
00445 /*22*/  WORD cbAlignment;
00446 /*24*/  WORD res24;
00447 /*26*/  WORD res26;
00448 /*28*/  WORD cbSizeVft;
00449 /*2a*/  WORD res2a; /* always ffff */
00450 /*2c*/  WORD res2c; /* always ffff */
00451 /*2e*/  WORD res2e; /* always ffff */
00452 /*30*/  WORD res30; /* always ffff */
00453 /*32*/  WORD res32;
00454 /*34*/  WORD res34;
00455 } SLTG_TypeInfoTail;
00456 
00457 typedef struct {
00458 /*00*/ WORD res00; /* 0x0001 sometimes 0x0003 ?? */
00459 /*02*/ WORD res02; /* 0xffff */
00460 /*04*/ BYTE res04; /* 0x01 */
00461 /*05*/ DWORD cbExtra; /* No of bytes that follow */
00462 } SLTG_MemberHeader;
00463 
00464 typedef struct {
00465 /*00*/  WORD magic; /* 0x120a */
00466 /*02*/  WORD next;  /* offset in bytes to next block from start of block
00467                            group, 0xffff if last item */
00468 /*04*/  WORD name;  /* offset to name within name table */
00469 /*06*/  WORD value; /* offset to value from start of block group */
00470 /*08*/  WORD res08; /* 0x56 */
00471 /*0a*/  DWORD memid;    /* memid */
00472 /*0e*/  WORD helpcontext;/* 0xfffe == no context, 0x0001 == stored in EnumInfo struct, else offset
00473                 to value from start of block group */
00474 /*10*/  WORD helpstring;/* offset from start of block group to string offset */
00475 } SLTG_EnumItem;
00476 
00477 #define SLTG_ENUMITEM_MAGIC 0x120a
00478 
00479 typedef struct {
00480     BYTE magic; /* 0x4c, 0xcb or 0x8b with optional SLTG_FUNCTION_FLAGS_PRESENT flag */
00481     BYTE inv;   /* high nibble is INVOKE_KIND, low nibble = 2 */
00482     WORD next;  /* byte offset from beginning of group to next fn */
00483     WORD name;  /* Offset within name table to name */
00484     DWORD dispid;   /* dispid */
00485     WORD helpcontext; /* helpcontext (again 1 is special) */
00486     WORD helpstring;/* helpstring offset to offset */
00487     WORD arg_off;   /* offset to args from start of block */
00488     BYTE nacc;  /* lowest 3bits are CALLCONV, rest are no of args */
00489         BYTE retnextopt;/* if 0x80 bit set ret type follows else next WORD
00490                is offset to ret type. No of optional args is
00491                middle 6 bits */
00492     WORD rettype;   /* return type VT_?? or offset to ret type */
00493     WORD vtblpos;   /* position in vtbl? */
00494     WORD funcflags; /* present if magic & 0x20 */
00495 /* Param list starts, repeat next two as required */
00496 #if 0
00497     WORD  name; /* offset to 2nd letter of name */
00498     WORD+ type; /* VT_ of param */
00499 #endif
00500 } SLTG_Function;
00501 
00502 #define SLTG_FUNCTION_FLAGS_PRESENT 0x20
00503 #define SLTG_FUNCTION_MAGIC 0x4c
00504 #define SLTG_DISPATCH_FUNCTION_MAGIC 0xcb
00505 #define SLTG_STATIC_FUNCTION_MAGIC 0x8b
00506 
00507 typedef struct {
00508 /*00*/  BYTE magic;     /* 0xdf */
00509 /*01*/  BYTE res01;     /* 0x00 */
00510 /*02*/  DWORD res02;        /* 0xffffffff */
00511 /*06*/  DWORD res06;        /* 0xffffffff */
00512 /*0a*/  DWORD res0a;        /* 0xffffffff */
00513 /*0e*/  DWORD res0e;        /* 0xffffffff */
00514 /*12*/  DWORD res12;        /* 0xffffffff */
00515 /*16*/  DWORD res16;        /* 0xffffffff */
00516 /*1a*/  DWORD res1a;        /* 0xffffffff */
00517 /*1e*/  DWORD res1e;        /* 0xffffffff */
00518 /*22*/  DWORD res22;        /* 0xffffffff */
00519 /*26*/  DWORD res26;        /* 0xffffffff */
00520 /*2a*/  DWORD res2a;        /* 0xffffffff */
00521 /*2e*/  DWORD res2e;        /* 0xffffffff */
00522 /*32*/  DWORD res32;        /* 0xffffffff */
00523 /*36*/  DWORD res36;        /* 0xffffffff */
00524 /*3a*/  DWORD res3a;        /* 0xffffffff */
00525 /*3e*/  DWORD res3e;        /* 0xffffffff */
00526 /*42*/  WORD  res42;        /* 0xffff */
00527 /*44*/  DWORD number;       /* this is 8 times the number of refs */
00528 /*48*/  /* Now we have number bytes (8 for each ref) of SLTG_UnknownRefInfo */
00529 
00530 /*50*/  WORD res50;     /* 0xffff */
00531 /*52*/  BYTE res52;     /* 0x01 */
00532 /*53*/  DWORD res53;        /* 0x00000000 */
00533 /*57*/  SLTG_Name names[1];
00534   /*    Now we have number/8 SLTG_Names (first WORD is no of bytes in the ascii
00535    *    string).  Strings look like "*\Rxxxx*#n".  If xxxx == ffff then the
00536    *    ref refers to the nth type listed in this library (0 based).  Else
00537    *    the xxxx (which maybe fewer than 4 digits) is the offset into the name
00538    *    table to a string "*\G{<guid>}#1.0#0#C:\WINNT\System32\stdole32.tlb#"
00539    *    The guid is the typelib guid; the ref again refers to the nth type of
00540    *    the imported typelib.
00541    */
00542 
00543 /*xx*/ BYTE resxx;      /* 0xdf */
00544 
00545 } SLTG_RefInfo;
00546 
00547 #define SLTG_REF_MAGIC 0xdf
00548 
00549 typedef struct {
00550     WORD res00; /* 0x0001 */
00551     BYTE res02; /* 0x02 */
00552     BYTE res03; /* 0x40 if internal ref, 0x00 if external ? */
00553     WORD res04; /* 0xffff */
00554     WORD res06; /* 0x0000, 0x0013 or 0xffff ?? */
00555 } SLTG_UnknownRefInfo;
00556 
00557 typedef struct {
00558   WORD res00; /* 0x004a */
00559   WORD next;  /* byte offs to next interface */
00560   WORD res04; /* 0xffff */
00561   BYTE impltypeflags; /* IMPLTYPEFLAG_* */
00562   BYTE res07; /* 0x80 */
00563   WORD res08; /* 0x0012, 0x0028 ?? */
00564   WORD ref;   /* number in ref table ? */
00565   WORD res0c; /* 0x4000 */
00566   WORD res0e; /* 0xfffe */
00567   WORD res10; /* 0xffff */
00568   WORD res12; /* 0x001d */
00569   WORD pos_in_table; /* 0x0, 0x4, ? */
00570 } SLTG_ImplInfo;
00571 
00572 #define SLTG_IMPL_MAGIC 0x004a
00573 
00574 typedef struct {
00575   BYTE magic; /* 0x0a */
00576   BYTE flags;
00577   WORD next;
00578   WORD name;
00579   WORD byte_offs; /* pos in struct, or offset to const type or const data (if flags & 0x08) */
00580   WORD type; /* if flags & 0x02 this is the type, else offset to type */
00581   DWORD memid;
00582   WORD helpcontext; /* ?? */
00583   WORD helpstring; /* ?? */
00584   WORD varflags; /* only present if magic & 0x02 */
00585 } SLTG_Variable;
00586 
00587 #define SLTG_VAR_MAGIC 0x0a
00588 #define SLTG_VAR_WITH_FLAGS_MAGIC 0x2a
00589 
00590 
00591 /* CARRAYs look like this
00592 WORD type == VT_CARRAY
00593 WORD offset from start of block to SAFEARRAY
00594 WORD typeofarray
00595 */
00596 
00597 #include "poppack.h"
00598 
00599 HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const FUNCDESC **ppFuncDesc );
00600 
00601 extern DWORD _invoke(FARPROC func,CALLCONV callconv, int nrargs, DWORD *args);
00602 
00603 HRESULT TMARSHAL_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv);
00604 
00605 /* The OLE Automation ProxyStub Interface Class (aka Typelib Marshaler) */
00606 DEFINE_OLEGUID( CLSID_PSDispatch,    0x00020420, 0x0000, 0x0000 );
00607 DEFINE_OLEGUID( CLSID_PSEnumVariant, 0x00020421, 0x0000, 0x0000 );
00608 DEFINE_OLEGUID( CLSID_PSTypeInfo,    0x00020422, 0x0000, 0x0000 );
00609 DEFINE_OLEGUID( CLSID_PSTypeLib,     0x00020423, 0x0000, 0x0000 );
00610 DEFINE_OLEGUID( CLSID_PSOAInterface, 0x00020424, 0x0000, 0x0000 );
00611 DEFINE_OLEGUID( CLSID_PSTypeComp,    0x00020425, 0x0000, 0x0000 );
00612 
00613 /*---------------------------END--------------------------------------------*/
00614 #endif

Generated on Sun May 27 2012 04:25:45 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.