http://bugs.winehq.org/show_bug.cgi?id=33887
Bug #: 33887 Summary: Patches for marshaling VT_UNKNOWN in SAFEARRAYS Product: Wine Version: 1.6-rc3 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: oleaut32 AssignedTo: wine-bugs@winehq.org ReportedBy: rosen.diankov@gmail.com Classification: Unclassified
Many applications marshal SAFEARRAY structures with IUnknown interfaces in them. The following short patches in dlls/oleaut32/usrmarshal.c should implement support for them.
One thing I'm not sure yet is if the marshaling requires 4-byte alignment. Seems to work as is though:
in <code> ULONG WINAPI LPSAFEARRAY_UserSize(ULONG *pFlags, ULONG StartingSize, LPSAFEARRAY *ppsa) </code>
add <code> case SF_UNKNOWN: case SF_DISPATCH: case SF_HAVEIID: { IUnknown** ppUnknown; FIXME("size interfaces 0x%x\n", sftype); for (ppUnknown = psa->pvData; ulCellCount; ulCellCount--, ppUnknown++) { size += interface_variant_size(pFlags, &IID_IUnknown, *ppUnknown); } break; } </code>
In <code> unsigned char * WINAPI LPSAFEARRAY_UserMarshal(ULONG *pFlags, unsigned char *Buffer, LPSAFEARRAY *ppsa) </code>
add
<code> case SF_UNKNOWN: case SF_DISPATCH: case SF_HAVEIID: { IUnknown** ppUnknown; FIXME("marshal interfaces 0x%x\n", sftype); for (ppUnknown = psa->pvData; ulCellCount; ulCellCount--, ppUnknown++) { /* this should probably call WdtpInterfacePointer_UserMarshal in ole32.dll */ Buffer = interface_variant_marshal(pFlags, Buffer, &IID_IUnknown, *ppUnknown); } break; } </code>
in
<code> unsigned char * WINAPI LPSAFEARRAY_UserUnmarshal(ULONG *pFlags, unsigned char *Buffer, LPSAFEARRAY *ppsa) </code>
<code> case SF_UNKNOWN: case SF_DISPATCH: case SF_HAVEIID: { IUnknown** ppUnknown; FIXME("unmarshal interfaces 0x%x\n", sftype); for (ppUnknown = (*ppsa)->pvData; cell_count; cell_count--, ppUnknown++) { /* this should probably call WdtpInterfacePointer_UserUnmarshal in ole32.dll */ Buffer = interface_variant_unmarshal(pFlags, Buffer, &IID_IUnknown, ppUnknown); } break; } </code>
http://bugs.winehq.org/show_bug.cgi?id=33887
Rosen Diankov rosen.diankov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major
http://bugs.winehq.org/show_bug.cgi?id=33887
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID Severity|major |normal
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com 2013-06-26 02:23:00 CDT --- Patches are not picked up from bugzilla, you need to use wine-patches@winehq.org list instead, and wine-devel@winehq.org for reviews. Also this is not even patch, it should be a text file in diff format and it needs tests.
http://bugs.winehq.org/show_bug.cgi?id=33887
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Austin English austinenglish@gmail.com 2013-06-26 13:27:08 CDT --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=33887
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #3 from Dan Kegel dank@kegel.com 2013-07-01 10:32:08 CDT --- Just to be clear, the problem isn't invalid, it's the bug report that wasn't well-formed. I'd love to see a proper bug report with a recipe for reproducing the problem.
Also, it's great that you sent patches to wine-patches, but you should include test cases in each patch. That might help settle the question of whether alignment is needed, too.