|Microsoft DirectX 9.0|
The InsertTool method inserts a tool in the graph.
Note Do not use or distribute tools from untrusted sources. Tools can contain unsafe code.
HRESULT InsertTool( IDirectMusicTool * pTool, DWORD * pdwPChannels, DWORD cPChannels, LONG lIndex );
Tool to insert.
Address of an array of
Count of how many channels are pointed to by pdwPChannels. Ignored if pdwPChannels is NULL.
Position at which to place the tool. This is a zero-based index from the start of the current tool list or, if it is negative, from the end of the list. If lIndex is out of range, the tool is placed at the beginning or end of the list. To place a tool at the end of the list, use a value that is larger than the number of tools in the current tool list.
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.
The reference count of the tool is incremented.
This method calls IDirectMusicTool8::Init.
Header: Declared in dmusici.h.