The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


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.

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



Reason for the notification. The following values are defined:

MCI_NOTIFY_ABORTEDThe 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_FAILUREA device error occurred while the device was executing the command.
MCI_NOTIFY_SUCCESSFULThe conditions initiating the callback function have been met.
MCI_NOTIFY_SUPERSEDEDThe device received another command with the "notify" flag set and the current conditions for initiating the callback function have been superseded.



Identifier of the device initiating the callback function.

Return Value

Returns zero if successful or an error otherwise.


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.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]


Mmsystem.h (include Windows.h)

See also

MCI Messages