MMIOM_CUT
Appearance
The MMIOM_CUT message is sent to a Multimedia I/O (MMIO) procedure to request that a specified range of data be extracted from the file, copied to the system clipboard, and then deleted from the file. It operates sequentially as an MMIOM_COPY followed by an MMIOM_CLEAR transaction.
Syntax
rc = mmioSendMessage(hmmio, MMIOM_CUT, (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_CUT`.
- lParam1 (LONG)
- A pointer to an MMIO_EDIT_PARMS structure that specifies the exact range of data to be cut.
- 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 cut and transferred to the clipboard.
- MMIO_ERROR: An error occurred, and both the file and clipboard states remain unmodified.
Remarks
- **Target Range**: The block of data to cut is designated by the `ulStartTime` and `ulDuration` fields inside the MMIO_EDIT_PARMS structure.
- **Duration Rule**: The `ulDuration` field must be non-zero. Executing a cut request with a duration of zero will result in an error.
- **Clipboard Interaction**: Any media data previously held within the system clipboard will be completely overwritten by the incoming extracted data chunk.
- **Media Pointer Update**: Following a successful cut operation, the internal file or media position pointer is automatically shifted to sit at the location designated by the `ulStartTime` value.
- **Documentation Typo Note**: The original OS/2 reference manual contains a slight cyclical phrasing typo, noting that it acts as if an `MMIOM_COPY` operation were "immediately followed by a MMIOM_CUT operation". Logically and programmatically, it functions as an `MMIOM_COPY` immediately followed by a destructive deletion (`MMIOM_CLEAR`/`MMIOM_DELETE`).