MODM_CACHEDRUMPATCHES

The MODM_CACHEDRUMPATCHES message requests a MIDI output driver to load and cache a specified set of key-based percussion patches.

Parameters
uDeviceId
Device identifier (0, 1, 2, and so on) for the target device.
uMsg
MODM_CACHEDRUMPATCHES
dwUser
Device instance identifier.
dwParam1
Pointer to an array of type KEYARRAY, which is described in the Win32 SDK.
dwParam2
Contains a DWORD value, defined as follows:

Low word

Flag values. (For flag descriptions, see midiOutCacheDrumPatches in the Win32 SDK.)

High word

Drum patch number.

Return Value

The driver should return MMSYSERR_NOERROR if the operation succeeds. Otherwise it should return one of the MMSYSERR or MIDIERR error codes defined in mmsystem.h. See midiOutCacheDrumPatches return values in the Win32 SDK.

Comments

A client sends the MODM_CACHEDRUMPATCHES message by calling the user-mode driver’s modMessage entry point, passing the specified parameters.

Typically, the user-mode driver requests the kernel-mode driver to cache the patches by calling DeviceIoControl with an IOCTL_MIDI_CACHE_DRUM_PATCHES control code.