IAudioMultiMediaDevice::CustomMessage

HRESULT CustomMessage(UINT uMsg, SDATA dData);

Sends a custom message to a multimedia device driver.

· Returns NOERROR if successful, or one of these error values:

E_FAIL
E_INVALIDARG
E_OUTOFMEMORY
AUDERR_NODRIVER

uMsg

[in] Message number to send to the multimedia driver.

dData

[in, out] Address of an SDATA structure that contains information to be sent with the custom message. This structure also receives data returned by the custom message. The data should not contain pointers because it may be marshaled.

An engine or application should send custom messages only after it has verified that the driver supports custom messages.

CustomMessage essentially calls the multimedia function WaveXXXMessage(hWave, uMsg, dData-dwSize, dData-pData). If the wave device resides in another process, the data buffer will be marshaled. It is not possible to reference memory directly in the data because the wave device might be opened by a different process.