Jump to content

MMIOM_ENDRECORD

From EDM2

The MMIOM_ENDRECORD message is sent to a Multimedia I/O (MMIO) procedure to mark the completion of a logical grouping of write operations. When an I/O procedure receives this message, it closes the current transaction or logical unit that was opened by a previous MMIOM_BEGINRECORD call, prompting the storage handler to finalize its internal tracking structures.

Syntax

rc = mmioSendMessage(hmmio, MMIOM_ENDRECORD, 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_ENDRECORD`.
lParam1 (LONG)
This parameter is not used.
lParam2 (LONG)
This parameter is not used.

Return Value

rc (ULONG)
Return codes indicating success or failure:
  • MMIO_SUCCESS: The logical record block was successfully closed and updated.
  • MMIO_ERROR: An error occurred, and the transaction boundaries could not be verified.

Remarks

  • **Transaction Finalization**: Sending MMIOM_ENDRECORD seals all the intervening `mmioWrite` calls executed since the matching MMIOM_BEGINRECORD call into a single discrete transaction.
  • **Undo/Redo History**: Once sealed, this entire collection of writes is committed to the history stack as a single compound action. A subsequent request using MMIOM_UNDO or MMIOM_REDO will treat the entire sequence as one atomic event rather than reversing individual writes one by one.
  • **I/O Updates**: Custom multimedia I/O procedures use this message as a hook to flush temporary transactional indexing arrays, commit index alterations to compound wrappers, or update structural file headers indicating a clean edit state block.

Related Functions

Related Messages