|Microsoft DirectX 9.0|
The CreateSegment method creates a segment containing the pattern track.
HRESULT CreateSegment( IDirectMusicStyle* pStyle, IDirectMusicSegment** ppSegment );
Address of a variable that receives an IDirectMusicSegment interface pointer for the created segment. Use QueryInterface to obtain IDirectMusicSegment8.
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.
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.
This method does not assign a pattern to the track. The style in pStyle provides only the tempo, time signature, and band. To assign a pattern, use IDirectMusicPatternTrack8::SetPatternByName.
Header: Declared in dmusici.h.