mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
Rename some of the fields in typelib.h to makes more evocative than
'unk00'.
This commit is contained in:
parent
464e59f6a4
commit
ab548adf86
@ -76,9 +76,9 @@ typedef struct tagMSFT_Header {
|
||||
INT helpfile; /* position of helpfile in stringtable */
|
||||
/*0x40*/INT CustomDataOffset; /* if -1 no custom data, else it is offset */
|
||||
/* in customer data/guid offset table */
|
||||
INT res44; /* unknown always: 0x20 */
|
||||
INT res48; /* unknown always: 0x80 */
|
||||
INT dispatchpos; /* gets a value (1+n*0x0c) with Idispatch interfaces */
|
||||
INT res44; /* unknown always: 0x20 (guid hash size?) */
|
||||
INT res48; /* unknown always: 0x80 (name hash size?) */
|
||||
INT dispatchpos; /* HREFTYPE to IDispatch, or -1 if no IDispatch */
|
||||
/*0x50*/INT res50; /* is zero becomes one when an interface is derived */
|
||||
} MSFT_Header;
|
||||
|
||||
@ -172,11 +172,11 @@ typedef struct {
|
||||
INT DataType; /* data type of the memeber, eg return of function */
|
||||
INT Flags; /* something to do with attribute flags (LOWORD) */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
INT16 res3; /* some offset into dunno what */
|
||||
INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
|
||||
INT16 VtableOffset; /* offset in vtable */
|
||||
#else
|
||||
INT16 VtableOffset; /* offset in vtable */
|
||||
INT16 res3; /* some offset into dunno what */
|
||||
INT16 funcdescsize; /* size of reconstituted FUNCDESC and related structs */
|
||||
#endif
|
||||
INT FKCCIC; /* bit string with the following */
|
||||
/* meaning (bit 0 is the msb): */
|
||||
@ -226,11 +226,11 @@ typedef struct {
|
||||
INT DataType; /* data type of the variable */
|
||||
INT Flags; /* VarFlags (LOWORD) */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
INT16 res3; /* some offset into dunno what */
|
||||
INT16 vardescsize; /* size of reconstituted VARDESC and related structs */
|
||||
INT16 VarKind; /* VarKind */
|
||||
#else
|
||||
INT16 VarKind; /* VarKind */
|
||||
INT16 res3; /* some offset into dunno what */
|
||||
INT16 vardescsize; /* size of reconstituted VARDESC and related structs */
|
||||
#endif
|
||||
INT OffsValue; /* value of the variable or the offset */
|
||||
/* in the data structure */
|
||||
@ -258,17 +258,23 @@ typedef struct {
|
||||
/* this is how a guid is stored */
|
||||
typedef struct {
|
||||
GUID guid;
|
||||
INT unk10; /* differntiate with libid, classid etc? */
|
||||
/* it's -2 for a libary */
|
||||
/* it's 0 for an interface */
|
||||
INT unk14; /* always? -1 */
|
||||
INT hreftype; /* -2 for the typelib guid, typeinfo offset
|
||||
for typeinfo guid, low two bits are 01 if
|
||||
this is an imported typeinfo, low two bits
|
||||
are 10 if this is an imported typelib (used
|
||||
by imported typeinfos) */
|
||||
INT next_hash; /* offset to next guid in the hash bucket */
|
||||
} MSFT_GuidEntry;
|
||||
/* some data preceding entries in the name table */
|
||||
typedef struct {
|
||||
INT unk00; /* sometimes -1 (lib, parameter) ,
|
||||
sometimes 0 (interface, func) */
|
||||
INT unk10; /* sometimes -1 (lib) , sometimes 0 (interface, func),
|
||||
sometimes 0x10 (par) */
|
||||
INT hreftype; /* is -1 if name is for neither a typeinfo,
|
||||
a variable, or a function (that is, name
|
||||
is for a typelib or a function parameter).
|
||||
otherwise is the offset of the first
|
||||
typeinfo that this name refers to (either
|
||||
to the typeinfo itself or to a member of
|
||||
the typeinfo */
|
||||
INT next_hash; /* offset to next name in the hash bucket */
|
||||
INT namelen; /* only lower 8 bits are valid,
|
||||
lower-middle 8 bits are unknown (flags?),
|
||||
upper 16 bits are hash code */
|
||||
|
@ -521,7 +521,7 @@ static int ctl2_alloc_guid(
|
||||
}
|
||||
|
||||
hash_key = (hash & 0xf) | ((hash & 0x10) & (0 - !!(hash & 0xe0)));
|
||||
guid_space->unk14 = This->typelib_guidhash_segment[hash_key];
|
||||
guid_space->next_hash = This->typelib_guidhash_segment[hash_key];
|
||||
This->typelib_guidhash_segment[hash_key] = offset;
|
||||
|
||||
TRACE("Updating GUID hash table (%s,0x%x).\n", debugstr_guid(&guid->guid), hash);
|
||||
@ -558,12 +558,12 @@ static int ctl2_alloc_name(
|
||||
if (offset == -1) return -1;
|
||||
|
||||
name_space = (void *)(This->typelib_segment_data[MSFT_SEG_NAME] + offset);
|
||||
name_space->unk00 = -1;
|
||||
name_space->unk10 = -1;
|
||||
name_space->hreftype = -1;
|
||||
name_space->next_hash = -1;
|
||||
memcpy(&name_space->namelen, encoded_name, length);
|
||||
|
||||
if (This->typelib_namehash_segment[encoded_name[2] & 0x7f] != -1)
|
||||
name_space->unk10 = This->typelib_namehash_segment[encoded_name[2] & 0x7f];
|
||||
name_space->next_hash = This->typelib_namehash_segment[encoded_name[2] & 0x7f];
|
||||
|
||||
This->typelib_namehash_segment[encoded_name[2] & 0x7f] = offset;
|
||||
|
||||
@ -751,8 +751,8 @@ static HRESULT ctl2_set_custdata(
|
||||
|
||||
guidentry.guid = *guid;
|
||||
|
||||
guidentry.unk10 = -1;
|
||||
guidentry.unk14 = -1;
|
||||
guidentry.hreftype = -1;
|
||||
guidentry.next_hash = -1;
|
||||
|
||||
guidoffset = ctl2_alloc_guid(This, &guidentry);
|
||||
if (guidoffset == -1) return E_OUTOFMEMORY;
|
||||
@ -1114,8 +1114,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetGuid(ICreateTypeInfo2 *iface, REFGUI
|
||||
TRACE("(%p,%s)\n", iface, debugstr_guid(guid));
|
||||
|
||||
guidentry.guid = *guid;
|
||||
guidentry.unk10 = 0;
|
||||
guidentry.unk14 = 0x18;
|
||||
guidentry.hreftype = 0;
|
||||
guidentry.next_hash = 0x18;
|
||||
|
||||
offset = ctl2_alloc_guid(This->typelib, &guidentry);
|
||||
|
||||
@ -1147,8 +1147,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, U
|
||||
WCHAR stdole2tlb[] = { 's','t','d','o','l','e','2','.','t','l','b',0 };
|
||||
|
||||
foo.guid = IID_StdOle;
|
||||
foo.unk10 = 2;
|
||||
foo.unk14 = -1;
|
||||
foo.hreftype = 2;
|
||||
foo.next_hash = -1;
|
||||
guidoffset = ctl2_alloc_guid(This->typelib, &foo);
|
||||
if (guidoffset == -1) return E_OUTOFMEMORY;
|
||||
|
||||
@ -1156,8 +1156,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, U
|
||||
if (fileoffset == -1) return E_OUTOFMEMORY;
|
||||
|
||||
foo.guid = IID_IDispatch;
|
||||
foo.unk10 = 1;
|
||||
foo.unk14 = -1;
|
||||
foo.hreftype = 1;
|
||||
foo.next_hash = -1;
|
||||
guidoffset = ctl2_alloc_guid(This->typelib, &foo);
|
||||
if (guidoffset == -1) return E_OUTOFMEMORY;
|
||||
|
||||
@ -3028,8 +3028,8 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetGuid(ICreateTypeLib2 * iface, REFGUID
|
||||
TRACE("(%p,%s)\n", iface, debugstr_guid(guid));
|
||||
|
||||
guidentry.guid = *guid;
|
||||
guidentry.unk10 = -2;
|
||||
guidentry.unk14 = -1;
|
||||
guidentry.hreftype = -2;
|
||||
guidentry.next_hash = -1;
|
||||
|
||||
offset = ctl2_alloc_guid(This, &guidentry);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user