dlm_FileRead()
Reads an event from the file.
#include "dlmfile.h" DlmResult dlm_FileRead ( DlmFileId id, DlmEvent * eventOut );
id | id of file to read from |
eventOut | output for event read |
dlm_FileRead() reads an event from the file. Events read must eventually be released back to the file session by calling dlm_FileReleaseEvent().
If successful, dlm_FileRead() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if ((result = dlm_FileRead(id, &event)) < 0) { printf("Error: Failure reading %s.\n", dlm_ErrorMessage(result)); } else { /* do something */ if ((result = dlm_FileReleaseEvent(id, event)) < 0) { printf("Error: Failure releasing event (%p): (%d) %s.\n", event, result, dlm_ErrorMessage(result)); } else { printf("Event released.\n"); } }