MMProgRef - Notification Messages: Difference between revisions
Created page with "{{MMProgRef}} The system uses notification messages to respond to applications, indicating system status such as completion of a media device function or passing of the ownership of a media device between processes. Messages are returned to applications **asynchronously** (using **WinPostMsg**), except for MM_MCIEVENT, which is sent **synchronously** (using **WinSendMsg**). A media control interface call that results in the dispatch of these two messages (such as ..." |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
The system uses notification messages to respond to applications, indicating system status such as completion of a media device function or passing of the ownership of a media device between processes. | The system uses notification messages to respond to applications, indicating system status such as completion of a media device function or passing of the ownership of a media device between processes. | ||
Messages are returned to applications | Messages are returned to applications '''asynchronously''' (using '''WinPostMsg'''), except for [[MM_MCIEVENT]], which is sent '''synchronously''' (using '''WinSendMsg'''). A media control interface call that results in the dispatch of these two messages (such as [[MCI_OPEN]] and [[MCI_ACQUIREDEVICE]]) must be issued from application threads that have a message queue. | ||
All messages except system messages operate in an asynchronous mode without notification unless | All messages except system messages operate in an asynchronous mode without notification unless '''MCI_NOTIFY''' or '''MCI_WAIT''' is specified. These two flags are mutually exclusive. If both are used, an '''MCIERR_FLAGS_NOT_COMPATIBLE''' error is returned. If '''MCI_WAIT''' is used, control is not returned to the caller until the command completes. '''MCI_NOTIFY''' returns control to the caller and then completes the command. A notification will be sent to the application if '''MCIERR_SUCCESS''' was returned on the call. | ||
The second parameter specified for each message is a pointer to a control block structure associated with that message. This pointer is passed in the *pParam2* parameter of [[mciSendCommand]]. | The second parameter specified for each message is a pointer to a control block structure associated with that message. This pointer is passed in the *pParam2* parameter of [[mciSendCommand]]. | ||
Latest revision as of 03:09, 26 November 2025
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
| Multimedia Programming Reference |
|---|
|
The system uses notification messages to respond to applications, indicating system status such as completion of a media device function or passing of the ownership of a media device between processes.
Messages are returned to applications asynchronously (using WinPostMsg), except for MM_MCIEVENT, which is sent synchronously (using WinSendMsg). A media control interface call that results in the dispatch of these two messages (such as MCI_OPEN and MCI_ACQUIREDEVICE) must be issued from application threads that have a message queue.
All messages except system messages operate in an asynchronous mode without notification unless MCI_NOTIFY or MCI_WAIT is specified. These two flags are mutually exclusive. If both are used, an MCIERR_FLAGS_NOT_COMPATIBLE error is returned. If MCI_WAIT is used, control is not returned to the caller until the command completes. MCI_NOTIFY returns control to the caller and then completes the command. A notification will be sent to the application if MCIERR_SUCCESS was returned on the call.
The second parameter specified for each message is a pointer to a control block structure associated with that message. This pointer is passed in the *pParam2* parameter of mciSendCommand.
| Function | Description |
|---|---|
| MM_MCICUEPOINT | Notifies application that a cue point is found in a playlist, or that a cue point has been detected, which was set with the MCI_SET_CUEPOINT message. |
| MM_MCIEVENT | Notifies application of an event generated by a device. |
| MM_MCINOTIFY | Notifies an application after a device completes action or an error occurs. |
| MM_MCIPASSDEVICE | Notifies application that a shared device is being gained or lost. |
| MM_MCIPLAYLISTMESSAGE | Notifies application that playlist processor has found a MESSAGE instruction. |
| MM_MCIPOSITIONCHANGE | Notifies applications of current media position. |