widl: res50 is number of impinfos. Fix its usage.
This commit is contained in:
parent
e8f4fff3ea
commit
4812abc247
|
@ -76,7 +76,7 @@ typedef struct tagMSFT_Header {
|
||||||
INT res44; /* unknown always: 0x20 (guid hash size?) */
|
INT res44; /* unknown always: 0x20 (guid hash size?) */
|
||||||
INT res48; /* unknown always: 0x80 (name hash size?) */
|
INT res48; /* unknown always: 0x80 (name hash size?) */
|
||||||
INT dispatchpos; /* HREFTYPE to IDispatch, or -1 if no IDispatch */
|
INT dispatchpos; /* HREFTYPE to IDispatch, or -1 if no IDispatch */
|
||||||
/*0x50*/INT res50; /* is zero becomes one when an interface is derived */
|
/*0x50*/INT nimpinfos; /* number of impinfos */
|
||||||
} MSFT_Header;
|
} MSFT_Header;
|
||||||
|
|
||||||
/* segments in the type lib file have a structure like this: */
|
/* segments in the type lib file have a structure like this: */
|
||||||
|
|
|
@ -156,7 +156,7 @@ static void ctl2_init_header(
|
||||||
typelib->typelib_header.res44 = 0x20;
|
typelib->typelib_header.res44 = 0x20;
|
||||||
typelib->typelib_header.res48 = 0x80;
|
typelib->typelib_header.res48 = 0x80;
|
||||||
typelib->typelib_header.dispatchpos = -1;
|
typelib->typelib_header.dispatchpos = -1;
|
||||||
typelib->typelib_header.res50 = 0;
|
typelib->typelib_header.nimpinfos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -608,6 +608,8 @@ static int alloc_importinfo(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impinfo->flags |= typelib->typelib_header.nimpinfos++;
|
||||||
|
|
||||||
offset = ctl2_alloc_segment(typelib, MSFT_SEG_IMPORTINFO, sizeof(MSFT_ImpInfo), 0);
|
offset = ctl2_alloc_segment(typelib, MSFT_SEG_IMPORTINFO, sizeof(MSFT_ImpInfo), 0);
|
||||||
if (offset == -1) return -1;
|
if (offset == -1) return -1;
|
||||||
|
|
||||||
|
@ -1801,9 +1803,6 @@ static void add_dispatch(msft_typelib_t *typelib)
|
||||||
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;
|
||||||
|
|
||||||
typelib->typelib_header.res50 = 1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface)
|
static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface)
|
||||||
|
|
Loading…
Reference in New Issue