# xxxProcessEvent

Called when an event is addressed to a service.

#### Prototype

DWORD xxxProcessEvent (CTAHD ctahd, void *mgrcontext, DISP_EVENT *ctaevt)

Argument | Description
ctahd | Context handle.
mgrcontext | Pointer to data structure returned by xxxOpenServiceManager.
ctaevt | Pointer to event structure: typedef struct { DWORD id; /* Event code (and source service ID) */ CTAHD ctahd; /* Natural Accesso context handle */ DWORD timestamp; /* timestamp */ DWORD userid; /* User ID (defined by ctaCreateContext */ DWORD size; /* Size of buffer if buffer != NULL */ void *buffer; /* Buffer pointer */ DWORD value; /* Event status or event-specific data */ DWORD extra; /* Extra internal event field */ unsigned objHd; /*Service object handle (formerly "reserved")*/ MESSAGE_ADDR addr; /* Source/Destination service ID */ } DISP_EVENT; typedef struct { WORD source /* source service ID */ WORD destination /* destination service ID */ } MESSAGE_ADDR;

#### Return values

SUCCESS

#### Details

xxxProcessEvent is invoked when an event is sent to this service from another Natural Access service. The manager context allocated when the service manager was opened and a pointer to the event to process are passed in as arguments.

This function is typically called when a device service sends an event to an integration service. Usually a device service processes its events in the event handling function (xxxFetchAndProcess) registered with the wait object by dispRegisterWaitObject. If it has an event to send to the higher-level service, it sends it to the dispatcher event queue using dispQueueEvent. The dispatcher then calls xxxProcessEvent of the integration service for further processing.

For more information about this function, refer to Runtime binding functions.

#### See also

dispMakeAndQueueEvent, dispRegisterServiceManager