DirectX SDK

IDirectMusicStyle::GetMotif

The IDirectMusicStyle::GetMotif method creates a segment containing the named motif.

HRESULT GetMotif(
  WCHAR* pwszName, 
  IDirectMusicSegment** ppSegment
);

Parameters

pwszName
Name of the motif to be retrieved.
ppSegment
Address of a variable to receive a pointer to a segment containing the named motif.

Return Values

If the method succeeds, the return value is S_OK or S_FALSE.

If it fails, the method can return E_POINTER.

Remarks

The method searches the style's list of motifs for one whose name matches pwszName. If one is found, a segment is created containing a motif track. The track references the style as its associated style and the motif as its pattern.

If there is no motif with the name, the method returns S_FALSE.

Requirements

  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

Using Motifs