# dispQueueCommand

Adds a command message to a context's dispatcher queue. (This command is available only when using the in-process Natural Access server.)

#### Prototype

DWORD NMSAPI dispQueueCommand (DISP_COMMAND *ctacmd);

Argument | Description
ctacmd | Pointer to DISP_COMMAND structure containing the message to add: typedef struct { DWORD id; /* Command ID (and dest. service ID) */ CTAHD ctahd; /* Natural Access context handle */ DWORD size1; /* If dataptr1 !=NULL => size1 is buffer */ /* size- else message specific data */ void *dataptr1; /* Data pointer */ DWORD size2; /* If dataptr2 !=NULL => size2 is buffer */ /* size- else message specific data */ void *dataptr2; /* Data pointer */ DWORD size3; /* If dataptr3 !=NULL => size3 is buffer */ /* size- else message specific data */ void *dataptr3; /* Data pointer */ DWORD objHd; /*Service object handle (formerly "reserved")*/ MESSAGE_ADDR addr; /* Source/Destination service ID */ } DISP_COMMAND; typedef struct { WORD source /* Source service ID */ WORD destination /* Destination service ID */ } MESSAGE_ADDR

#### Return values

Return value | Description
SUCCESS |
CTAERR_BAD_ARGUMENT | ctacmd is NULL or id field in the command is invalid.
CTAERR_SERVICE_NOT_AVAILABLE | Service associated with the command is not available on the command context.
CTAERR_NOT_IMPLEMENTED | Command unavailable when not using the in-process Natural Access server.

#### Details

dispQueueCommand adds a DISP_COMMAND structure to a context's dispatcher queue and signals the default queue wait object.