The sequence of events received during a monitor session can be written to a file using the DLM File API. The API is used in a way analogous to the C Language Standard IO library functions, except that reading and writing are done in units of DlmEvents
To write a file:
Ownership of the events being written remains with the application.
To read a file:
As an alternative to 2 above, you can call dlm_FileReadEvents() and provide a callback to read all of the events from the file. The callback mechanism is almost identical to that used by the Monitor API and described under dlm_MonOpen() with one exception: reading stops if the callback function returns a negative value such as dlm_ERROR_END_OF_FILE.
Ownership of the events read is transferred to the application. Events read with either dlm_FileRead() or dlm_FileReadEvents() must eventually be released back to the file session by calling dlm_FileReleaseEvent().