DLM File

File Release Event

dlm_FileReleaseEvent()

Releases an event for disposal or reuse.

Syntax
#include "dlmfile.h"

DlmResult dlm_FileReleaseEvent
    (
        DlmFileId  id,
        DlmEvent   event
    );
idid of session event received on
eventevent to release
Description

dlm_FileReleaseEvent() releases an event for disposal or reuse. This function will free any memory associated with the event.

Return Values

If successful, dlm_FileReleaseEvent() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also

dlm_FileRead()
dlm_FileReadEvents()
dlm_FileWrite()

Example
if ((result = dlm_FileRead(id, &event)) < 0)
{
    printf("Error: Failure reading (%p): (%d) %s.\n",
                   event, result, 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);
    }
}