IDirectMusicGraph::InsertTool

The IDirectMusicGraph::InsertTool method inserts a tool in the graph.

HRESULT InsertTool(
  IDirectMusicTool * pTool,
  DWORD * pdwPChannels,
  DWORD cPChannels,
  LONG lIndex
);
 

Parameters

pTool
Tool to insert.
pdwPChannels
Array of PChannels on which the tool accepts messages. If the tool accepts messages on all PChannels, pass NULL.
cPChannels
Count of how many PChannels are pointed to by pdwPChannels. Ignored if pdwPChannels is NULL.
lIndex
Position at which to place the tool. This is a zero-based index from either the start or (if it is negative) the end of the current tool list. If lIndex is out of range, the tool will be placed at the very beginning or end of the list. To place a tool at the end of the list, use a number for lIndex that is larger than the number of tools in the current tool list.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method may return one of the following error values:

DMUS_E_ALREADY_EXISTS
E_OUTOFMEMORY
E_POINTER

Remarks

The reference count of the tool is incremented.

This method calls IDirectMusicTool::Init.

QuickInfo

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusici.h.