Jump to content

MMIO Functions - MMIO Messages

From EDM2
Revision as of 20:30, 25 November 2025 by Martini (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 MMIO messages are sent to an I/O procedure as a result of an MMIO function call. For example, when an application calls mmioOpen, the MMIOM_OPEN message is sent to an I/O procedure. An application can also send the MMIO messages to an I/O procedure by issuing mmioSendMessage or by directly calling the I/O procedure.

The mmioSendMessage function should be used only to pass user-defined messages, or messages not automatically generated by an MMIO function, to the I/O procedure of the user's application.

When an application issues mmioSendMessage, it passes an hmmio parameter, which MMIO converts to an MMIOINFO block before sending the parameter to the I/O procedure. When an application calls an I/O procedure directly, a pmmioinfo parameter is passed to the I/O procedure instead of an hmmio. The following is a function prototype for a direct I/O procedure call:

LONG APIENTRY MMIOPROC (PVOID pmmioinfo, USHORT usMsg, LONG lParam1, LONG lParam2);
Message Description
MMIOM_BEGININSERT Requests that all subsequent Writes insert data at the current seek position.
MMIOM_BEGINRECORD Requests all subsequent Writes be considered one logical unit by an UNDO or REDO.
MMIOM_BEGINSTREAM Sent before the first mmioRead or mmioWrite to start the stream at the optimum rate for the file.
MMIOM_CLEAR Requests that a specified range be deleted from a file.
MMIOM_CLOSE Requests that the file be closed.
MMIOM_COPY Requests that a specified range be copied to the clipboard.
MMIOM_CUT Requests that a specified range be copied to the clipboard and then deleted.
MMIOM_ENDSTREAM Sent after the last mmioRead or mmioWrite to end the stream.
MMIOM_DELETE Requests that information be removed from a file.
MMIOM_ENDINSERT Requests that all subsequent Writes overwrite data at the current seek position.
MMIOM_ENDRECORD Indicates that the logical record operation has ended and data structures should be updated, if necessary.
MMIOM_GETCF Obtains the handle (hmmcf) of the RIFF compound file.
MMIOM_GETCFENTRY Requests a CTOC entry for an element of a RIFF compound file.
MMIOM_GETFORMATINFO Requests that the IOProc return an MMFORMATINFO structure.
MMIOM_GETFORMATNAME Requests the format name for the IOProc.
MMIOM_GETHEADER Requests that the IOProc return media-specific information.
MMIOM_IDENTIFYFILE Attempts to determine if any IOProc can process a file.
MMIOM_MULTITRACKREAD Requests that data be read from a movie file.
MMIOM_MULTITRACKWRITE Requests that data be written to a movie file.
MMIOM_OPEN Requests that a file be opened or deleted.
MMIOM_PASTE Requests that data from the clipboard be inserted into a file.
MMIOM_QUERYHEADERLENGTH Requests that the IOProc return the size the header.
MMIOM_QUERYIMAGE Requests that the IOProc return the currently selected image index in the image file.
MMIOM_QUERYIMAGECOUNT Requests that the IOProc return the number of images stored in the image file.
MMIOM_READ Requests that bytes be read from an open file.
MMIOM_REDO Requests that the last logical action which was undone be redone.
MMIOM_SAVE Requests temporary changes in a file.
MMIOM_SEEK Requests that the current file position be moved.
MMIOM_SEEKBYTIME Requests that the file position be moved relative to some unit of time.
MMIOM_SET Requests that extended file information be set or queried.
MMIOM_SETHEADER Requests that the IOProc use media-specific information when writing or accepting data.
MMIOM_SETIMAGE Selects a new image index in the image file.
MMIOM_STATUS Used to pass appropriate MCI_STATUS requests to an IOProc.
MMIOM_TEMPCHANGE Requests that all subsequent Writes to the media be treated as temporary changes.
MMIOM_UNDO Requests that the last logical action, either a delete, insert, undo, or redo, be undone.
MMIOM_WINMSG Allows an application or an MCD to pass PM messages from a window procedure to an IOProc.
MMIOM_WRITE Requests that the bytes be written to an open file.

The MMIO messages indicate, to the I/O procedure, the type of MMIO operation to be performed. I/O procedures can be called to process files that might or might not use the RIFF format standard.

Note
The compound-file messages must not be used while creating or appending to the compound file itself.