[PATCH 0/1] MR10502: oleaut32: Implement SLTG union type processing.
https://bugs.winehq.org/show_bug.cgi?id=59590 When MS-Money 2000 loads INV7.OCX the message "02c0:fixme:ole:ITypeLib2_Constructor_SLTG Not processing typekind 7" is shown. I implemented the processing for TKIND_UNION for SLTG typelibs - SLTG_ProcessUnion(). Testing: 1. With MS-Money 2000. After patching the message is gone. 2. With dumping a small tlb in SLTG format that contains a simple union type. The type is shown with the patch applied. Please see details and the logs in the bug comments. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10502
From: Wolfgang Hartl <wolfo.dev@wolke7.net> --- dlls/oleaut32/typelib.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index e9997a86d24..9f6c7e12f16 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -4358,6 +4358,23 @@ static void SLTG_ProcessRecord(char *pBlk, ITypeInfoImpl *pTI, free(ref_lookup); } +static void SLTG_ProcessUnion(char *pBlk, ITypeInfoImpl *pTI, + const char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, + const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings) +{ + sltg_ref_lookup_t *ref_lookup = NULL; + + if (pTIHeader->href_table != 0xffffffff) + ref_lookup = SLTG_DoRefs((SLTG_RefInfo*)((char *)pTIHeader + pTIHeader->href_table), + pTI->pTypeLib, (char *)pNameTable); + + if (pTITail->vars_off != 0xffff) + SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, + pNameTable, ref_lookup, hlp_strings); + + free(ref_lookup); +} + static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI, char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, const SLTG_TypeInfoTail *pTITail) @@ -4715,9 +4732,14 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) SLTG_ProcessModule((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, pTIHeader, pTITail, hlp_strings); break; + + case TKIND_UNION: + SLTG_ProcessUnion((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, + pTIHeader, pTITail, hlp_strings); + break; default: - FIXME("Not processing typekind %d\n", pTIHeader->typekind); + ERR("Unknown typekind %d, expected < %d\n", pTIHeader->typekind, TKIND_MAX); break; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10502
participants (2)
-
Wolfgang Hartl -
Wolfgang Hartl (@wolfo.dev)