Microsoft DirectX 8.0 (C++)

IDirectMusicPatternTrack8::CreateSegment

Creates a segment containing the pattern track.

HRESULT CreateSegment(
  IDirectMusicStyle* pStyle,
  IDirectMusicSegment** ppSegment
);

Parameters

pStyle
Style to use in creating the segment.
ppSegment
Address of a variable that receives an IDirectMusicSegment interface pointer for the created segment. Use QueryInterface to obtain IDirectMusicSegment8.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return one of the following error values.

DMUS_E_NOT_INIT
E_OUTOFMEMORY

Remarks

A pattern track is usually obtained from a segment object loaded from a file or resource, in which case the application already has the IDirectMusicSegment interface. This method is used for creating a segment when the pattern track object has been created by using CoCreateInstance.

Requirements

  Header: Declared in dmusici.h.