Use
It_GetEventEx is an extended version of the
It_GetEvent function.Similar to the It_GetEvent function, It_GetEventEx gets an event and fills out the GUI Library's event structure and all of the related structures with information on the event. Like the It_GetEvent function, It_GetEventEx is a blocking call.
It_GetEventEx extends the functionality of It_GetEvent in that it allows you to use flags to control how the event information is obtained.
One of the important flags you can use with the It_GetEventEx is the GV_GETFRONTEVENT, with which you specify that the event is obtained from the SAPGUI Front, instead of from the R/3 application server.
Syntax
DWORD DLEX It_GetEventEx(HANDLE hMr, PPIT_EVENT ppEvt, DWORD flgs);
Parameters
hMr |
Connection handle |
ppEvt |
Pointer to a pointer to the IT_EVENT structure. The client application defines a PIT_EVENT and initializes it to zero. On return this value will be changed to point to a properly structured IT_EVENT structure. |
| flgs |
Flags to control the operation of It_GetEventEx. Using It_GetEventEx with flgs set to zero is equivalent to using It_GetEvent. |
Return Value
Returns TRUE on success, FALSE on error.
Comments
It_GetEventEx is the base level API to all the other It_GetEvent APIs.
After getting an event, you can read the bits in the
eventtype memebr of IT_EVENT to get a preview of the type of information that exists in the event structure.Example
// Go into a debug loop to dump out messages from the
// application server.
while(It_GetEventEx(hMerlin, &pEvt,
GV_PEEK_EVENT | GV_DEBUG_DUMP)) {
if(pEvt->eventtype & EVT_END_OF_SESSION)
break;
}
See Also
It_GetEvent, It_PeekEvent, It_NewConnection.