IDirectMusicTool::Init

The IDirectMusicTool::Init method is called when the tool is inserted into the graph, giving the tool an opportunity to perform any necessary initialization.

HRESULT Init(
  IDirectMusicGraph* pGraph
);
 

Parameters

pGraph
Pointer to the calling graph.

Return Values

Return values are determined by the implementation. If successful, the method should return S_OK. If it fails, the method may return one of the following error values:

E_FAIL
E_NOTIMPL

Remarks

Because a tool can be inserted into more than one graph, this method must be able to deal gracefully with multiple calls.

Care must be taken not to create a circular reference to the graph represented by pGraph. For more information, see DirectMusic Tools.

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.

See Also

IDirectMusicGraph::InsertTool