Jump to content

MMIOM_PASTE

From EDM2


The MMIOM_PASTE message is sent to a Multimedia I/O (MMIO) procedure to request that media data currently held in the system clipboard be inserted into an open file at a designated timeline position.

Syntax

rc = mmioSendMessage(hmmio, MMIOM_PASTE, (LONG)pMmioEditParms, 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_PASTE`.
lParam1 (LONG)
A pointer to an MMIO_EDIT_PARMS structure defining target edit parameters such as insertion timestamps, durations, and object configurations.
lParam2 (LONG)
This parameter is not used.

Return Value

rc (ULONG)
Return codes indicating success or failure:
  • MMIO_SUCCESS: The clipboard data was successfully integrated into the target media file structure.
  • MMIO_ERROR: An error occurred during clipboard parsing, or the file structure could not be modified.

Remarks

  • **Insertion Point Layout**: The I/O procedure inserts the source clipboard contents immediately prior to the timeline mark specified in the `ulStartTime` field of the MMIO_EDIT_PARMS structure. Upon a successful paste sequence, the file's internal seek pointer is automatically updated to rest immediately after the newly pasted data block.
  • **Replace Mode (Trimming Range)**: The message features an integrated "replace" mechanism guided by the `ulDuration` field:
  • **If `ulDuration` is non-zero**: The I/O procedure performs an atomic delete operation covering the range specified by `ulStartTime` and `ulDuration` before performing the clipboard insertion. This achieves a classic "overwrite text with clipboard" operation.
  • **If `ulDuration` is zero**: The operation runs in pure insert mode. No existing downstream file components are cleared, and the incoming payload shifts the trailing contents further down the timeline.

Related Functions

Related Messages