https://bugs.winehq.org/show_bug.cgi?id=40024
--- Comment #5 from Andrew Eikum aeikum@codeweavers.com --- (In reply to Andrew Eikum from comment #3)
I'm not sure exactly how we can do this, but my approach would be to unmap the MODM_LONGDATA header just before invoking MOM_DONE. Maybe we can do this in mmsystem16.MMSYSTDRV_Callback3216. This would have the advantage of correctly copying the flags that are set in midimap.modLongData to the 16-bit header. The flags are currently not reaching the application in the MOM_DONE callback invoked by midimap.modLongData.
A complication here is that we don't touch every header that comes through. For example, headers coming in from midiStreamOut get passed straight through to winmm and eventually back out through the MOM_DONE callback.