Read method reads data from an incoming MIDI stream.
NTSTATUS Read( [in] PVOID BufferAddress, [in] ULONG BufferLength, [out] PULONG BytesRead );
- BufferAddress [in]
Specifies the address of a caller-allocated buffer. The method copies the incoming MIDI data from the device to the buffer. The allocated size of this buffer must be greater than or equal to BufferLength.
- BufferLength [in]
Specifies the length in bytes of the buffer pointed to by BufferAddress.
- BytesRead [out]
Output pointer to a caller-allocated variable into which the method writes a count specifying the actual number of bytes successfully read from the device into the buffer.
Read returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code. The following table shows some of the possible return status codes.
Invalid device request (for example, calling
The miniport driver calls IPortMidi::Notify to notify the port driver when incoming MIDI data becomes available from the capture device. The port driver calls IMiniportMidi::Read to retrieve the data. The port driver continues to call
Read as long as more data is available.
Read method returns STATUS_SUCCESS and a BytesRead count of zero to indicate that no more MIDI input data is currently available from the device.
Build date: 11/16/2013