Module: wine Branch: refs/heads/master Commit: e8f4fff3eacc6c61a2bd99148ed3c57a5387d816 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e8f4fff3eacc6c61a2bd9914...
Author: Jacek Caban jacek@codeweavers.com Date: Sat May 13 18:06:45 2006 +0200
oleaut32: res50 is number of impinfos. Fix its usage.
---
dlls/oleaut32/typelib.h | 2 +- dlls/oleaut32/typelib2.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/oleaut32/typelib.h b/dlls/oleaut32/typelib.h index c286fae..f82ca12 100644 --- a/dlls/oleaut32/typelib.h +++ b/dlls/oleaut32/typelib.h @@ -79,7 +79,7 @@ typedef struct tagMSFT_Header { 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 */ +/*0x50*/INT nimpinfos; /* number of impinfos */ } MSFT_Header;
/* segments in the type lib file have a structure like this: */ diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 7b4c670..ecebdc3 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -232,7 +232,7 @@ static void ctl2_init_header( This->typelib_header.res44 = 0x20; This->typelib_header.res48 = 0x80; This->typelib_header.dispatchpos = -1; - This->typelib_header.res50 = 0; + This->typelib_header.nimpinfos = 0; }
/**************************************************************************** @@ -677,6 +677,8 @@ static int ctl2_alloc_importinfo( } }
+ impinfo->flags |= This->typelib_header.nimpinfos++; + offset = ctl2_alloc_segment(This, MSFT_SEG_IMPORTINFO, sizeof(MSFT_ImpInfo), 0); if (offset == -1) return -1;
@@ -1252,7 +1254,6 @@ static HRESULT WINAPI ICreateTypeInfo2_f ctl2_alloc_importinfo(This->typelib, &impinfo);
This->typelib->typelib_header.dispatchpos = 1; - This->typelib->typelib_header.res50 = 1;
This->typeinfo->typekind |= 0x10; This->typeinfo->typekind &= ~0x0f;