Share via


IDirectMusicPerformance::SetNotificationHandle

This method sets the event handle (created by the Microsoft® Win32® CreateEvent function) for notifications. The application should use the Win32 WaitForSingleObject function on this handle. When signaled, the application should call the IDirectMusicPerformance::GetNotificationPMsg method to retrieve the notification event.

HRESULT SetNotificationHandle(
  HANDLE hNotification,
  REFERENCE_TIME rtMinimum
);

Parameters

  • hNotification
    Event handle created by CreateEvent, or 0 to clear out an existing handle.
  • rtMinimum
    Minimum time that the performance should hold onto old notify events before discarding them. The value 0 means to use the default minimum time of 20,000,000 reference time units, which is 2 seconds, or the previous value if this method has been called previously. If the application has not called GetNotificationPMsg by this time, the event is discarded to free the memory.

Return Values

The method returns S_OK.

Remarks

It is the application's responsibility to call the Win32 CloseHandle function on the notification handle when it is no longer needed.

Requirements

OS Versions: Windows CE .NET 4.0 and Windows CE .NET 4.1.
Header: Dmusici.h.
Link Library: Dmusic.lib.

See Also

Notification and Event Handling | IDirectMusicPerformance::GetNotificationPMsg

 Last updated on Monday, April 12, 2004

© 1992-2002 Microsoft Corporation. All rights reserved.