[PATCH 1/5] winmm: Improve MCI's Sysinfo command.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Tue Mar 30 07:01:33 CDT 2010


Hi,

Eric Pouech wrote:
>did you test the 16 => 32 bit conversion for the MCI_ALL_DEVICE ?

Which ones do you have in mind? There are tests involving MCI_ALL_DEVICE_ID
that pass on both win9x and later (also in patch #5).  I wrote a few
more MCI tests privately.  Generally, I added (UINT16) casts in Wine
when I saw test failures on Win9x platforms, then kept doing so (i.e.
I'm not sure I've tested SYSINFO with a 0000FFFF deviceID on Win9x in
particular or whether I simply use that pattern everywhere now after
having been burnt once).  There are a few patches already in
git that fix a few MCI_ALL_DEVICE_ID here and there, but as you wrote
yourself in the TODO header long ago, support for it is incomplete.
Making "close all", "play all" etc. work is on my private TODO list, but
I never started working on this particular item.

>actually, I'd say it belongs to the 16=>32 mci message mapper, not in 
>generic 32bit code
Do you mean dlls/mmsystem.dll16? I never looked at it but I
 don't think that's the correct place, see below.
Do you mean the A/W (un)mapping? That's distinct, because it deals
 with string conversions only, as the name suggests, and it does
 not mogrify dwParam1.

Current test results suggest that MCI_ALL_DEVICE_ID is not only a 16/32
issue -- at least when I equate 16 with MS-Windows 3.x -- Have a look
at the mciGetDeviceID("all") test case, which returns a 16bit FFFF on Win9x,
not FFFFFFFF.  Therefore I believe Wine must be prepared for receiving
0000FFFF as ALL_ID from old Win9X apps or drivers -- possibly regardless
of them using the A or W function entry points.

Of course, a single (or few) central place(s) to convert
wDeviceID=(MCIDEVICEID)(WORD)wDeviceID or
wDeviceID= wDeviceID==0xFFFF ? MCI_DEVICE_ALL_ID : wDeviceID
is a nice idea.  That could be a distinct patch.  I'm convinced this
handle is truly a 16 bit entity, even after it has been upgraded to a UINT/DWORD
type at some time in the past.  Still, SYSINFO is a special case, as it
receives a device ID not only as function argument but also in its PARMS structure.

Regards,
 Jörg Höhle.



More information about the wine-devel mailing list