Jump to content

MMIOM_CLEAR

From EDM2

The MMIOM_CLEAR message is sent to a Multimedia I/O (MMIO) procedure to request that a specific range of data be permanently deleted from a file. Unlike a cut operation, this deletion is destructive and bypasses the system clipboard entirely.

Syntax

rc = mmioSendMessage(hmmio, MMIOM_CLEAR, (LONG)pEditParms, 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_CLEAR`.
lParam1 (LONG)
A pointer to an MMIO_EDIT_PARMS structure that specifies the exact range of data to be cleared.
lParam2 (LONG)
This parameter is not used.

Return Value

rc (ULONG)
Return codes indicating success or failure:
  • MMIO_SUCCESS: The specified media data range was successfully deleted.
  • MMIO_ERROR: An error occurred, and the file contents remain unmodified.

Remarks

  • **Target Range**: The exact segment to clear is determined by the `ulStartTime` and `ulDuration` fields inside the MMIO_EDIT_PARMS structure.
  • **Duration Rule**: The `ulDuration` field must be non-zero. Attempting to send this message with a duration of zero will result in an error.
  • **Media Pointer Update**: Following a successful clear operation, the internal file or media position pointer is automatically updated to sit at the location designated by the `ulStartTime` value.
  • **Non-Clipboard Operation**: This message handles direct data truncation and compression within the file. If you wish to retain a copy of the removed data for pasting elsewhere, use MMIOM_CUT instead.

Related Functions

Related Messages