The MODM_CACHEPATCHES message requests a MIDI output driver to load and cache a specified bank of patches.
Parameters
uDeviceId
Device identifier (0, 1, 2, and so on) for the target device.
uMsg
MODM_CACHEPATCHES
dwUser
Device instance identifier.
dwParam1
Pointer to an array of type PATCHARRAY, which is described in the Win32 SDK.
dwParam2
Contains a DWORD value, defined as follows:
Low word | Flag values. (For flag descriptions, see midiOutCachePatches in the Win32 SDK.) |
High word | Patch bank number. Zero implies the default bank. |
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 midiOutCachePatches return values in the Win32 SDK.
Comments
A client sends the MODM_CACHEPATCHES 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 patch bank by calling DeviceIoControl with an IOCTL_MIDI_CACHE_PATCHES control code.