Microsoft DirectX 8.0 (C++)

IDirectMusicSegment8::AddNotificationType

Adds a notification type. This method is called by the IDirectMusicPerformance8::AddNotificationType method, allowing the segment to respond to notifications. The segment calls each track's IDirectMusicTrack8::AddNotificationType method.

HRESULT AddNotificationType(
  REFGUID rguidNotificationType
);

Parameters

rguidNotificationType
Reference to (C++) or address of (C) the identifier of the notification type to add. For the defined types, see DMUS_NOTIFICATION_PMSG. Applications can also define their own types for custom tracks.

Return Values

If the method succeeds,Remarks

DirectSound does not initialize the contents of the buffer, and the application cannot assume that it contains silence.

If an attempt is made to create a buffer with the DSBCAPS_LOCHARDWARE flag on a system where hardware acceleration is not available, the method fails with DSERR_CONTROLUNAVAIL on Windows 95 and Windows 98. On Windows 2000, it returns DSERR_INVALIDCALL.

the return value is S_OK.

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

E_POINTER
E_OUTOFMEMORY

Remarks

Segments cannot generate notifications of type GUID_NOTIFICATION_PERFORMANCE. To get notifications of this type, you must call IDirectMusicPerformance8::AddNotificationType.

Requirements

  Header: Declared in dmusici.h.

See Also

Notification and Event Handling