The PutMessage method passes a DMUS_KERNEL_EVENT structure to its next destination. The miniport driver uses this method to discard used event structures so that they can be recycled by the allocator.
NTSTATUS
PutMessage(
IN PDMUS_KERNEL_EVENT pDMKEvt
);
PutMessage returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.
Declared in dmusicks.h. Include dmusicks.h.
During rendering, the miniport driver calls the PutMessage method to discard used DMUS_KERNEL_EVENT structures. The method routes the discarded structures to the allocator for reuse. The miniport driver calls this method once it has extracted the MIDI data from the structures for rendering.
This method is also be used during MIDI capture to package and pass MIDI messages to the capture sink in PortDMus. These messages can be single, multiple, or fragmentary MIDI events and are packaged in DMUS_KERNEL_EVENT structures (which are retrieved by IAllocatorMXF::GetMessage calls).
The allocator is always the last destination in any chain, so every DMUS_KERNEL_EVENT structure will eventually be recycled. If IMXF::ConnectOutput has not been called, PutMessage will default to passing the structure to the allocator.
For more information, see Allocator.
DMUS_KERNEL_EVENT, IAllocatorMXF::GetMessage, IMXF::ConnectOutput