Update the import table code to eliminate a few magic constants.
This commit is contained in:
parent
fe311461a7
commit
a2051075fe
|
@ -157,7 +157,7 @@ typedef struct tagMSFT_TypeInfoBase {
|
||||||
|
|
||||||
/* layout of an entry with information on imported types */
|
/* layout of an entry with information on imported types */
|
||||||
typedef struct tagMSFT_ImpInfo {
|
typedef struct tagMSFT_ImpInfo {
|
||||||
INT res0; /* bits 0 - 15: count */
|
INT flags; /* bits 0 - 15: count */
|
||||||
/* bit 16: if set oGuid is an offset to Guid */
|
/* bit 16: if set oGuid is an offset to Guid */
|
||||||
/* if clear oGuid is a typeinfo index in the specified typelib */
|
/* if clear oGuid is a typeinfo index in the specified typelib */
|
||||||
/* bits 24 - 31: TKIND of reference */
|
/* bits 24 - 31: TKIND of reference */
|
||||||
|
@ -165,6 +165,8 @@ typedef struct tagMSFT_ImpInfo {
|
||||||
INT oGuid; /* offset in Guid table or typeinfo index (see bit 16 of res0) */
|
INT oGuid; /* offset in Guid table or typeinfo index (see bit 16 of res0) */
|
||||||
} MSFT_ImpInfo;
|
} MSFT_ImpInfo;
|
||||||
|
|
||||||
|
#define MSFT_IMPINFO_OFFSET_IS_GUID 0x00010000
|
||||||
|
|
||||||
/* function description data */
|
/* function description data */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* INT recsize; record size including some xtra stuff */
|
/* INT recsize; record size including some xtra stuff */
|
||||||
|
|
|
@ -1751,7 +1751,7 @@ static void add_dispatch(msft_typelib_t *typelib)
|
||||||
guidentry.guid = iid_idispatch;
|
guidentry.guid = iid_idispatch;
|
||||||
guidentry.hreftype = 1;
|
guidentry.hreftype = 1;
|
||||||
guidentry.next_hash = -1;
|
guidentry.next_hash = -1;
|
||||||
impinfo.res0 = 0x301 << 16;
|
impinfo.flags = TKIND_INTERFACE << 24 | MSFT_IMPINFO_OFFSET_IS_GUID;
|
||||||
impinfo.oImpFile = impfile_offset;
|
impinfo.oImpFile = impfile_offset;
|
||||||
impinfo.oGuid = ctl2_alloc_guid(typelib, &guidentry);
|
impinfo.oGuid = ctl2_alloc_guid(typelib, &guidentry);
|
||||||
typelib->typelib_header.dispatchpos = alloc_importinfo(typelib, &impinfo) | 0x01;
|
typelib->typelib_header.dispatchpos = alloc_importinfo(typelib, &impinfo) | 0x01;
|
||||||
|
|
Loading…
Reference in New Issue