Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
INETRESPONSECALLBACK
#include "l_bitmap.h"
#include "ltnet.h"
L_VOID pEXT_CALLBACK INETRESPONSECALLBACK (hComputer, uCommand, uCommandID, nError, nStatus, uParams, pParams, uExtra, pExtra, pUserData)
L_COMP hComputer; |
/* handle to a remote computer */ |
CMDTYPE uCommand; |
/* command type */ |
L_UINT uCommandID; |
/* message id */ |
L_INT nError; |
/* status of the received data */ |
L_INT nStatus; |
/* status */ |
L_UINT uParams; |
/* number of parameters */ |
pPARAMETER pParams; |
/* pointer to parameters */ |
L_UINT uExtra; |
/* length */ |
L_CHAR * pExtra; |
/* pointer to extra data */ |
L_VOID * pUserData; |
/* pointer to additional parameters */ |
Notifies the local computer that a response has been received from a remote computer
Parameter |
Description |
hComputer |
Handle to the remote computer that sent this command. |
uCommand |
The command type which prompted this response. For a list of possible values, refer to CMDTYPE. |
uCommandID |
Command Id. Each command sent by a member of a connection should have a unique ID. Since a member of a connection may send several commands, this ID allows that member to identify when a specific request has been completed. |
nError |
Determines whether the command was received properly. If not all the parameters were received properly, then nStatus will be set to an error code (most likely ERROR_TRANSFER_ABORTED). Note that this is not the status of the command. This is only an indication of whether this response has been received properly. nStatus indicates whether the command has executed properly or not. |
nStatus |
Status of the original command. It indicates whether the command has executed properly on the remote end. If the command completes successfully, this should be SUCCESS. Otherwise the value should be one of the Error Codes. |
uParams |
The number of parameters for this response. |
pParams |
Pointer to an array of PARAMETER structures that contain the parameters for the response. |
uExtra |
Length of any extra data sent with the response. |
pExtra |
Pointer to the extra data sent with the response. |
pUserData |
A void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of the calling function.) |
|
Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function. |
Comments
A call to this function is generated when a computer receives a response from a remote computer.
To use this callback function, it must be set using L_InetSetResponseCallback. If this callback function is not set, INETCALLBACK will be called instead.
Note: |
The parameters (uParams, pParams) and the extra data (uExtra, pExtra) for this response are not the parameters of the original command! They are only sent if this response needs to send some data to the computer that originally sent the command. An example of a response that needs to send a parameter back is the response for the CMD_CREATE_WIN command. In this case, the response will need to send back the window handle of the newly created window. Most of the responses will only send back the status of the command (nStatus). |
The string parameters and pExtra are only valid during this call. Do not free these pointers and dont try to keep references to the strings. If the data is needed outside this function, allocate buffers and copy the data into them.
Required DLLs and Libraries
LTNET For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
See Also
Functions: |
L_InetSetResponseCallback, INETCOMMANDCALLBACK, L_InetSetCommandCallback |
Topics: |
|
|
Example
For an example, refer to L_InetSetCommandCallback.