Jump to content

MMProgRef - Notification Messages: Difference between revisions

From EDM2
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
Line 1: Line 1:
[[Category:WorkToDo]]
{{MMProgRef}}
{{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.
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.

Revision as of 21:19, 25 November 2025

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

Multimedia Programming Reference
  1. Introduction
  2. What's New...
  3. MCI Functions
  4. High-Level Macro Service Functions
  5. Subsystem Messages
  6. Notification Messages
  7. MCI Command Messages
  8. String Commands
  9. Memory Playlist Commands
  10. Graphic Button Control
  11. Secondary Window Functions
  12. MMIO Functions
  13. MMIO Messages
  14. CODEC Messages
  15. DIVE Functions
  16. Real-Time MIDI Functions
  17. SPI Functions
  18. Data Stream State Table
  19. SMH Messages
  20. DDCMD Messages
  21. VSD Commands
  22. SHD Messages
  23. SHC Messages
  24. Data Types
  25. Types of MIDI Messages
  26. Multimedia Specification Overview
  27. Resource Interchange File Format
  28. Multimedia File Formats
  29. RIFF Compound Files and Elements - Sharing and Access
  30. Return Codes
  31. Notices
  32. Glossary

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.