If you look closely at the definitions of MCI_xyz_PARMS in MMSYSTEM.H,
you'll notice that (at least on 32bit systems), despite the different
types (DWORD, LPSTR, UINT) these structures are originally an array of
32bit values.  This regular structure is essential, because the
MCI command parser has very limited means to know about different
sizes.  All it knows is MCI_INTEGER, MCI_STRING, MCI_CONSTANT.
actually, this patch is still broken
I originally assumed that the MCI structs were 8-byte aligned on WIN64, which is wrong actually, it's 4 byte aligned, meaning that we need some more work on MCI string parser to take care of this

An app that sends an MCI_xyz command sends a pointer to such an array,
decorated as MCI_xyz_PARMSA/W for nicer access.  Alternatively, when
using mciSendString, the MCI parser builds this array of
DWORD elements, then calls the MCI command.  In recent Wine, this has
become an array of DWORD_PTR instead.
wine-tests may work because Wine is cnosistent with itself, but
How can this possibly work without breaking binary compatibility?
in that case, we (likely) need to write integral values as DWORD (on both 32 and 64 bit systems) and strings & pointers as DWORD_PTR
A+

--
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the 
ingenuity of a complete idiot." (Douglas Adams)





Reply via email to