MMIOM_DELETE
Appearance
The MMIOM_DELETE message is sent to a Multimedia I/O (MMIO) procedure to request that a specific range of bytes or media samples be permanently removed from an open file.
Syntax
rc = mmioSendMessage(hmmio, MMIOM_DELETE, lParam1, lParam2);
Parameters
- pmmioinfo (PMMIOINFO)
- A pointer to an MMIOINFO data structure maintaining the current state of the open file.
- usMsg (USHORT)
- The message identifier, set to `MMIOM_DELETE`.
- lParam1 (LONG)
- The starting position in the file where the deletion begins, expressed in units appropriate for the media type (typically bytes from the beginning of the file).
- lParam2 (LONG)
- The length of the data to be deleted, expressed in the same media units.
Return Value
- rc (ULONG)
- Return codes indicating success or failure:
- MMIO_SUCCESS: The specified data range was successfully removed and the file structure adjusted.
- MMIO_ERROR: An error occurred, and the file data remains unchanged.
Remarks
- Physical vs. Logical Truncation: Depending on how the I/O procedure is implemented, this message typically physically collapses the gap left by the deleted range, pulling all downstream data forward and shortening the overall file size.
- Comparison with MMIOM_CLEAR: While MMIOM_CLEAR performs a similar destructive deletion, it requires an MMIO_EDIT_PARMS structure passed through a single parameter. MMIOM_DELETE passes the raw offset position and length arguments directly inside lParam1 and lParam2, making it a lighter-weight alternative for generic byte-level file trimming.