Previous Next

IAllocatorMXF::GetMessage

The GetMessage method serves as the retrieval point for any DirectMusic kernel-mode component that utilizes the port driver's allocator to reuse DMUS_KERNEL_EVENT structures.

HRESULT
  GetMessage(
    OUT PDMUS_KERNEL_EVENT  *ppDMKEvt
    );

Parameters

ppDMKEvt
Output pointer for the MIDI event. This parameter points to a caller-allocated pointer variable into which the method writes a pointer to the event structure being retrieved from the allocator. The structure itself is empty (zeroed by the allocator).

Return Value

GetMessage returns S_OK if the call was successful. Otherwise, the method returns an appropriate error code.

Headers

Declared in dmusicks.h. Include dmusicks.h.

Comments

The miniport driver uses the GetMessage method to retrieve event structures for MIDI rendering and capture. This method retrieves DMUS_KERNEL_EVENT structures from the same pool that IMXF::PutMessage puts them into when it discards them to the allocator.

In the case of a MIDI capture stream, the port driver retrieves capture events from the miniport driver when prompted by the usual Service DPC.

For more information, see Allocator.

See Also

DMUS_KERNEL_EVENT, IMXF::PutMessage