Get last event – Rockwell Automation 2711P Software Development Kit User Manual User Manual
Page 76

Publication 2711P-UM005A-EN-P - March 2007
76 PanelView Plus CE-Specific Extensions to the WinCE API
Get Last Event
This function reads the last or newest Event from the Event log.
DWORD GetLastEvent (EVENT *pEvent);
Parameters:
pEvent
A pointer to an EVENT structure.
Return Values:
Remarks:
This function is typically used to establish the starting position for an
iteration loop that traverses the Event Long in the newest to oldest
direction; for example, last to first.
After establishing the starting position with this function, use
GetNextEvent() in a iteration loop with direction set to PRIOR. The
time/date stamps will be descending.
Portability:
This function is specific to the PanelView Plus CE.
Requirements:
GetLastEvent - Return Codes
Value
Description
EVENT_SUCCESS
The last; i.e. the most recent, Event was read
successfully and returned to the EVENT structure.
EVENT_ FILE_EMPTY
No Event was returned The Event log is empty.
EVENT_FAIL
No Event was returned. The operation failed.
Runs On
Version
Defined In
Link To
PanelView Plus CE
All
EventLog.h
EventLog.lib