Module: wine Branch: refs/heads/master Commit: 9c738061e0a0cb029a420a6f105699e27b2a6d69 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=9c738061e0a0cb029a420a6f...
Author: Robert Shearman rob@codeweavers.com Date: Wed May 31 12:20:39 2006 +0100
oleaut32: Make sure to read the memid and the name offset from the correct offsets, after the function data, so add cFuncs to the offsets in MSFT_DoVars.
Resolve referenced types for variables. Fixes initialisation of the dbgrid32 OCX.
---
dlls/oleaut32/typelib.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 25a5354..ce4f02f 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -1899,7 +1899,7 @@ static void MSFT_DoVars(TLBContext *pcx, *pptvd=TLB_Alloc(sizeof(TLBVarDesc)); /* name, eventually add to a hash table */ MSFT_ReadLEDWords(&nameoffset, sizeof(INT), pcx, - offset + infolen + (cFuncs + cVars + i + 1) * sizeof(INT)); + offset + infolen + (2*cFuncs + cVars + i + 1) * sizeof(INT)); (*pptvd)->Name=MSFT_ReadName(pcx, nameoffset); /* read the variable information record */ MSFT_ReadLEDWords(&reclength, sizeof(INT), pcx, recoffset); @@ -1915,7 +1915,7 @@ static void MSFT_DoVars(TLBContext *pcx, (*pptvd)->HelpStringContext=pVarRec->HelpStringContext; /* fill the VarDesc Structure */ MSFT_ReadLEDWords(&(*pptvd)->vardesc.memid, sizeof(INT), pcx, - offset + infolen + ( i + 1) * sizeof(INT)); + offset + infolen + (cFuncs + i + 1) * sizeof(INT)); (*pptvd)->vardesc.varkind = pVarRec->VarKind; (*pptvd)->vardesc.wVarFlags = pVarRec->Flags; MSFT_GetTdesc(pcx, pVarRec->DataType, @@ -1927,6 +1927,7 @@ static void MSFT_DoVars(TLBContext *pcx, pVarRec->OffsValue, pcx); } else (*pptvd)->vardesc.u.oInst=pVarRec->OffsValue; + MSFT_ResolveReferencedTypes(pcx, pTI, &(*pptvd)->vardesc.elemdescVar.tdesc); pptvd=&((*pptvd)->next); recoffset += reclength; }