Called when a command is addressed to a service.
DWORD xxxProcessCommand (CTAHD ctahd, void *mgrcontext, DISP_COMMAND *ctacmd)
|
Argument |
Description |
|
ctahd |
Context handle. |
|
mgrcontext |
Pointer to data structure returned by xxxOpenServiceManager. |
|
ctacmd |
Pointer to a command structure to process. The DISP_COMMAND structure contains the following fields: typedef struct |
|
Return value |
Description |
|
SUCCESS |
There are no out or inout parameters being returned. |
|
SUCCESS_RESPONSE |
There are out or inout parameters containing data to be returned to the caller. |
|
Any Natural Access or service-specific error code. |
|
xxxProcessCommand is invoked when a command is sent to a service managed by this service manager. The mgrcontext allocated when the service manager was opened (with xxxOpenServiceManager) and a pointer to the command to process are passed in as arguments.
This function:
Allocates a table of function pointers to API implementation functions
Performs a lookup based on an incoming command code within the DISP_COMMAND message buffer
Performs an upcall to the appropriate function
Commands must not block in xxxProcessCommand. They must return SUCCESS, SUCCESS_RESPONSE, or an error code to the dispatcher.
The dispatcher returns either SUCCESS or an error code to the calling SPI function that called dispSendCommand.
If xxxProcessCommand returns SUCCESS, either the function completed successfully without return information or an asynchronous function was started successfully.
If xxxProcessCommand returns SUCCESS_RESPONSE, either the function completed successfully with return information or an asynchronous function started successfully.
For more information about this function, refer to Runtime binding functions.