|Microsoft DirectX 9.0|
The SetPatternByName method sets the pattern to be played by the track. The pattern comes from a style.
HRESULT SetPatternByName( IDirectMusicSegmentState* pSegState, WCHAR* wszName, IDirectMusicStyle* pStyle, DWORD dwPatternType, DWORD* pdwLength );
Address of the IDirectMusicSegmentState8 interface representing the playing instance of the segment that contains the track.
Name of the pattern to set. The name can be obtained by using IDirectMusicStyle8::EnumPattern.
Address of the IDirectMusicStyle or IDirectMusicStyle8 interface of the
One of the DMUS_STYLET_TYPES enumerations that specifies the type of pattern.
Address of a variable that receives the length of the pattern, in music time ticks.
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.
Header: Declared in dmusici.h.