Export (0) Print
Expand All

MM_MCINOTIFY

The MM_MCINOTIFY message notifies an application that an MCI device has completed an operation. MCI devices send this message only when the MCI_NOTIFY flag is used.

MM_MCINOTIFY 
wParam = (WPARAM) wFlags 
lParam = (LONG) lDevID

Parameters

wFlags

Reason for the notification. The following values are defined:

MCI_NOTIFY_ABORTED The device received a command that prevented the current conditions for initiating the callback function from being met. If a new command interrupts the current command and it also requests notification, the device sends this message only and not MCI_NOTIFY_SUPERSEDED
MCI_NOTIFY_FAILURE A device error occurred while the device was executing the command.
MCI_NOTIFY_SUCCESSFUL The conditions initiating the callback function have been met.
MCI_NOTIFY_SUPERSEDED The device received another command with the "notify" flag set and the current conditions for initiating the callback function have been superseded.

lDevID

Identifier of the device initiating the callback function.

Return Values

Returns zero if successful or an error otherwise.

Remarks

For more information about the MCI_NOTIFY flag, see The Notify Flag.

A device returns the MCI_NOTIFY_SUCCESSFUL flag with MM_MCINOTIFY when the action for a command finishes. For example, a CD audio device uses this flag for notification for the play (MCI_PLAY) command when the device finishes playing. The play command is successful only when it reaches the specified end position or reaches the end of the media. Similarly, the seek (MCI_SEEK) and record (MCI_RECORD) commands do not return MCI_NOTIFY_SUCCESSFUL until they reach the specified end position or reach the end of the media.

A device returns the MCI_NOTIFY_ABORTED flag with MM_MCINOTIFY only when it receives a command that prevents it from meeting the notification conditions. For example, the play command would not abort notification for a previous play command provided that the new command does not change the play direction or change the ending position. The seek and record commands behave similarly. MCI also does not send MCI_NOTIFY_ABORTED when playback or recording is paused with the pause (MCI_PAUSE) command. Sending the resume (MCI_RESUME) command allows them to continue to meet the callback conditions.

When your application requests notification for a command, check the error return of the mciSendString or mciSendCommand functions. If these functions encounter an error and return a nonzero value, MCI will not set notification for the command.

Requirements

  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Mmsystem.h; include Windows.h.

See Also

MCI, MCI Messages, MCI_PAUSE, MCI_PLAY, MCI_RECORD, MCI_RESUME, MCI_SEEK, mciSendString, mciSendCommand, pause, play, record, resume, seek

Show:
© 2015 Microsoft