Commit 45989a1f authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

oleaut32: Implement the 0x08 flag in SLTG_DoVars.

It means that the data is stored directly in pItem->byte_offs instead of the byte offset pointed to by it.
parent d76de4ee
......@@ -3099,7 +3099,6 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
SLTG_Variable *pItem;
unsigned short i;
WORD *pType;
char buf[300];
for(pItem = (SLTG_Variable *)pFirstItem, i = 0; i < cVars;
pItem = (SLTG_Variable *)(pBlk + pItem->next), i++) {
......@@ -3119,6 +3118,7 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
else
(*ppVarDesc)->Name = TLB_MultiByteToBSTR(pItem->name + pNameTable);
TRACE_(typelib)("name: %s\n", debugstr_w((*ppVarDesc)->Name));
TRACE_(typelib)("byte_offs = 0x%x\n", pItem->byte_offs);
TRACE_(typelib)("memid = 0x%x\n", pItem->memid);
......@@ -3132,6 +3132,9 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
(*ppVarDesc)->vardesc.u.lpvarValue = HeapAlloc(GetProcessHeap(), 0,
sizeof(VARIANT));
V_VT((*ppVarDesc)->vardesc.u.lpvarValue) = VT_INT;
if (pItem->flags & 0x08)
V_UNION((*ppVarDesc)->vardesc.u.lpvarValue, intVal) = pItem->byte_offs;
else
V_UNION((*ppVarDesc)->vardesc.u.lpvarValue, intVal) =
*(INT*)(pBlk + pItem->byte_offs);
}
......@@ -3152,13 +3155,17 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
else
pType = (WORD*)(pBlk + pItem->type);
if (pItem->flags & ~0xd2)
FIXME_(typelib)("unhandled flags = %02x\n", pItem->flags & ~0xd2);
if (pItem->flags & ~0xda)
FIXME_(typelib)("unhandled flags = %02x\n", pItem->flags & ~0xda);
SLTG_DoElem(pType, pBlk,
&(*ppVarDesc)->vardesc.elemdescVar, ref_lookup);
if (TRACE_ON(typelib)) {
char buf[300];
dump_TypeDesc(&(*ppVarDesc)->vardesc.elemdescVar.tdesc, buf);
TRACE_(typelib)("elemdescVar: %s\n", buf);
}
bstrPrevName = (*ppVarDesc)->Name;
ppVarDesc = &((*ppVarDesc)->next);
......
......@@ -576,7 +576,7 @@ typedef struct {
BYTE flags;
WORD next;
WORD name;
WORD byte_offs; /* pos in struct, or offset to const type */
WORD byte_offs; /* pos in struct, or offset to const type or const data (if flags & 0x08) */
WORD type; /* if flags & 0x02 this is the type, else offset to type */
DWORD memid;
WORD helpcontext; /* ?? */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment