[Wine-patches] [eter-2.1 3/4] oleaut32: Add support for decoding SLTG function help strings. (eterbug #4684).
Dmitry Timoshkov
dtimoshkov на etersoft.ru
Ср Янв 27 08:34:25 MSK 2016
---
dlls/oleaut32/typelib.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index d1b6574..4775aaa 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -3726,7 +3726,8 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
}
static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
- unsigned short cFuncs, char *pNameTable, const sltg_ref_lookup_t *ref_lookup)
+ unsigned short cFuncs, char *pNameTable, const sltg_ref_lookup_t *ref_lookup,
+ const BYTE *hlp_strings)
{
SLTG_Function *pFunc;
unsigned short i;
@@ -3763,6 +3764,8 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
pFuncDesc->funcdesc.cParams = pFunc->nacc >> 3;
pFuncDesc->funcdesc.cParamsOpt = (pFunc->retnextopt & 0x7e) >> 1;
pFuncDesc->funcdesc.oVft = pFunc->vtblpos & ~1;
+ if (pFunc->helpstring != 0xffff)
+ pFuncDesc->HelpString = decode_string(hlp_strings, pBlk + pFunc->helpstring, pNameTable - pBlk, pTI->pTypeLib);
if(pFunc->magic & SLTG_FUNCTION_FLAGS_PRESENT)
pFuncDesc->funcdesc.wFuncFlags = pFunc->funcflags;
@@ -3851,7 +3854,7 @@ static void SLTG_ProcessCoClass(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
- const SLTG_TypeInfoTail *pTITail)
+ const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings)
{
char *pFirstItem;
sltg_ref_lookup_t *ref_lookup = NULL;
@@ -3868,7 +3871,7 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
}
if (pTITail->funcs_off != 0xffff)
- SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup);
+ SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings);
heap_free(ref_lookup);
@@ -3911,7 +3914,7 @@ static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
- const SLTG_TypeInfoTail *pTITail)
+ const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings)
{
sltg_ref_lookup_t *ref_lookup = NULL;
if (pTIHeader->href_table != 0xffffffff)
@@ -3922,7 +3925,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup);
if (pTITail->funcs_off != 0xffff)
- SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup);
+ SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings);
if (pTITail->impls_off != 0xffff)
SLTG_DoImpls(pBlk + pTITail->impls_off, pTI, FALSE, ref_lookup);
@@ -3946,7 +3949,7 @@ static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
- const SLTG_TypeInfoTail *pTITail)
+ const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings)
{
sltg_ref_lookup_t *ref_lookup = NULL;
if (pTIHeader->href_table != 0xffffffff)
@@ -3957,7 +3960,7 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup);
if (pTITail->funcs_off != 0xffff)
- SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup);
+ SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings);
heap_free(ref_lookup);
if (TRACE_ON(typelib))
dump_TypeInfo(pTI);
@@ -4221,7 +4224,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
case TKIND_INTERFACE:
SLTG_ProcessInterface((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
- pTIHeader, pTITail);
+ pTIHeader, pTITail, hlp_strings);
break;
case TKIND_COCLASS:
@@ -4236,12 +4239,12 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
case TKIND_DISPATCH:
SLTG_ProcessDispatch((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
- pTIHeader, pTITail);
+ pTIHeader, pTITail, hlp_strings);
break;
case TKIND_MODULE:
SLTG_ProcessModule((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
- pTIHeader, pTITail);
+ pTIHeader, pTITail, hlp_strings);
break;
default:
--
2.6.5
Подробная информация о списке рассылки Wine-patches