Microsoft DirectX 9.0 SDK Update (October 2004) |
The GetInstrument method retrieves an instrument by its patch number.
Syntax
HRESULT GetInstrument(
DWORD dwPatch,
IDirectMusicInstrument** ppInstrument
);
Parameters
dwPatch
Instrument patch number.
ppInstrument
Address of a variable that receives a pointer to the IDirectMusicInstrument8 interface.
Return Values
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the error values shown in the following table.
Return code |
DMUS_E_INVALIDPATCH |
E_FAIL |
E_OUTOFMEMORY |
E_POINTER |
Remarks
The patch number passed in dwPatch describes the full patch address, including the MIDI parameters for MSB and LSB
For an example of how this method is used, see Working with Instruments.
Requirements
Header: Dmusicc.h
Library: Dmusic.h, Dmusicd.h
See Also