* it is at the beginning of a type lib file
*
*/
+
+#define MSFT_SIGNATURE 0x5446534D /* "MSFT" */
+
typedef struct tagMSFT_Header {
-/*0x00*/INT magic1; /* 0x5446534D "MSFT" */
+/*0x00*/INT magic1; /* 0x5446534D "MSFT" */
INT magic2; /* 0x00010002 version nr? */
INT posguid; /* position of libid in guid table */
/* (should be, else -1) */
/* function description data */
typedef struct {
-/* INT recsize; record size including some xtra stuff */
+ INT Info; /* record size including some extra stuff */
INT DataType; /* data type of the member, eg return of function */
INT Flags; /* something to do with attribute flags (LOWORD) */
#ifdef WORDS_BIGENDIAN
INT16 nrargs; /* number of arguments (including optional ????) */
INT16 nroargs; /* nr of optional arguments */
#endif
+
/* optional attribute fields, the number of them is variable */
- INT OptAttr[1];
-/*
-0* INT helpcontext;
-1* INT oHelpString;
-2* INT oEntry; // either offset in string table or numeric as it is //
-3* INT res9; // unknown (-1) //
-4* INT resA; // unknown (-1) //
-5* INT HelpStringContext;
- // these are controlled by a bit set in the FKCCIC field //
-6* INT oCustData; // custom data for function //
-7* INT oArgCustData[1]; // custom data per argument //
-*/
+ INT HelpContext;
+ INT oHelpString;
+ INT oEntry; /* either offset in string table or numeric as it is */
+ INT res9; /* unknown (-1) */
+ INT resA; /* unknown (-1) */
+ INT HelpStringContext;
+ /* these are controlled by a bit set in the FKCCIC field */
+ INT oCustData; /* custom data for function */
+ INT oArgCustData[1]; /* custom data per argument */
} MSFT_FuncRecord;
/* after this may follow an array with default value pointers if the
/* Variable description data */
typedef struct {
-/* INT recsize; // record size including some xtra stuff */
+ INT Info; /* record size including some extra stuff */
INT DataType; /* data type of the variable */
INT Flags; /* VarFlags (LOWORD) */
#ifdef WORDS_BIGENDIAN
/* optional attribute fields, the number of them is variable */
/* controlled by record length */
INT HelpContext;
- INT oHelpString;
+ INT HelpString;
INT res9; /* unknown (-1) */
INT oCustData; /* custom data for variable */
INT HelpStringContext;
-
} MSFT_VarRecord;
/* Structure of the reference data */
#include "poppack.h"
+/* heap allocation helpers */
+extern void* heap_alloc_zero(unsigned size);
+extern void* heap_alloc(unsigned size);
+extern void* heap_realloc(void *ptr, unsigned size);
+extern void heap_free(void *ptr);
+
HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const FUNCDESC **ppFuncDesc );
extern DWORD _invoke(FARPROC func,CALLCONV callconv, int nrargs, DWORD *args);