dispMakeAndQueueEvent

Creates an event and sends it to the application event queue or to the dispatcher event queue.

Prototype

DWORD dispMakeAndQueueEvent (CTAHD ctahd, unsigned id, unsigned value, unsigned source, unsigned destination)

Argument

Description

ctahd

Context handle returned by ctaCreateContext.

id

Event ID field of DISP_EVENT.

value

Value field of DISP_EVENT.

source

Source service identifier of the event (addr field of DISP_EVENT).

destination

Destination service identifier of the event (addr field of DISP_EVENT).


Return values

Return value

Description

SUCCESS

 

CTAERR_BAD_ARGUMENT

Function argument has an invalid value.

CTAERR_INVALID_CTAHD

Specified ctahd is invalid.

CTAERR_NOT_IMPLEMENTED

Function was called from the service interface.

CTAERR_NOT_INITIALIZED

Natural Access is not initialized.

CTAERR_OUT_OF_MEMORY

Unable to allocate memory for the queue, the driver, or the context.

CTAERR_SERVICE_NOT_AVAILABLE

Specified destination service is not available.


Details

dispMakeAndQueueEvent is a wrapper function for dispQueueEvent. It does the following:

source is typically the service ID. destination can be:

dispMakeAndQueueEvent is provided to simplify sending events to other services or to the application when the events only contain an event ID and value.