Commit 9c202682 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Vitaly Lipatov

oleaut32: Add support for decoding SLTG variable help strings.

parent 3f7b5794
...@@ -4096,7 +4096,7 @@ static char *SLTG_DoImpls(char *pBlk, ITypeInfoImpl *pTI, ...@@ -4096,7 +4096,7 @@ static char *SLTG_DoImpls(char *pBlk, ITypeInfoImpl *pTI,
} }
static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsigned short cVars, static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsigned short cVars,
const char *pNameTable, const sltg_ref_lookup_t *ref_lookup) const char *pNameTable, const sltg_ref_lookup_t *ref_lookup, const BYTE *hlp_strings)
{ {
TLBVarDesc *pVarDesc; TLBVarDesc *pVarDesc;
const TLBString *prevName = NULL; const TLBString *prevName = NULL;
...@@ -4126,6 +4126,12 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign ...@@ -4126,6 +4126,12 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
TRACE_(typelib)("byte_offs = 0x%x\n", pItem->byte_offs); TRACE_(typelib)("byte_offs = 0x%x\n", pItem->byte_offs);
TRACE_(typelib)("memid = %#lx\n", pItem->memid); TRACE_(typelib)("memid = %#lx\n", pItem->memid);
if (pItem->helpstring != 0xffff)
{
pVarDesc->HelpString = decode_string(hlp_strings, pBlk + pItem->helpstring, pNameTable - pBlk, pTI->pTypeLib);
TRACE_(typelib)("helpstring = %s\n", debugstr_w(pVarDesc->HelpString->str));
}
if(pItem->flags & 0x02) if(pItem->flags & 0x02)
pType = &pItem->type; pType = &pItem->type;
else else
...@@ -4365,9 +4371,9 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI, ...@@ -4365,9 +4371,9 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessRecord(char *pBlk, ITypeInfoImpl *pTI, static void SLTG_ProcessRecord(char *pBlk, ITypeInfoImpl *pTI,
const char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, const char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
const SLTG_TypeInfoTail *pTITail) const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings)
{ {
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, NULL); SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, NULL, hlp_strings);
} }
static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI, static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI,
...@@ -4408,7 +4414,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI, ...@@ -4408,7 +4414,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
pNameTable); pNameTable);
if (pTITail->vars_off != 0xffff) if (pTITail->vars_off != 0xffff)
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup); SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup, hlp_strings);
if (pTITail->funcs_off != 0xffff) if (pTITail->funcs_off != 0xffff)
SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings); SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings);
...@@ -4428,9 +4434,9 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI, ...@@ -4428,9 +4434,9 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI, static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI,
const char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, const char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
const SLTG_TypeInfoTail *pTITail) const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings)
{ {
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, NULL); SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, NULL, hlp_strings);
} }
static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI, static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
...@@ -4443,7 +4449,7 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI, ...@@ -4443,7 +4449,7 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
pNameTable); pNameTable);
if (pTITail->vars_off != 0xffff) if (pTITail->vars_off != 0xffff)
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup); SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup, hlp_strings);
if (pTITail->funcs_off != 0xffff) if (pTITail->funcs_off != 0xffff)
SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings); SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings);
...@@ -4698,12 +4704,12 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) ...@@ -4698,12 +4704,12 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
switch(pTIHeader->typekind) { switch(pTIHeader->typekind) {
case TKIND_ENUM: case TKIND_ENUM:
SLTG_ProcessEnum((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, SLTG_ProcessEnum((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
pTIHeader, pTITail); pTIHeader, pTITail, hlp_strings);
break; break;
case TKIND_RECORD: case TKIND_RECORD:
SLTG_ProcessRecord((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, SLTG_ProcessRecord((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
pTIHeader, pTITail); pTIHeader, pTITail, hlp_strings);
break; break;
case TKIND_INTERFACE: case TKIND_INTERFACE:
......
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