INETCOMMANDCALLBACK

#include "l_bitmap.h"
#include "ltnet.h"

L_VOID pEXT_CALLBACK INETCOMMANDCALLBACK (hComputer, uCommand, uCommandID, nError, uParams, pParams, uExtra, pExtra, pUserData)

L_COMP hComputer;

/* handle to a remote computer */

CMDTYPE uCommand;

/* command type */

L_UINT uCommandID;

/* command id */

L_INT nError;

/* status of the received data */

L_UINT uParams;

/* number of parameters */

pPARAMETER pParams;

/* pointer to an array of 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 command has been received from a remote computer

Parameter

Description

hComputer

Handle to the remote computer that sent the command.

uCommand

Command received from the remote computer. For a list of possible values, refer to CMDTYPE.

uCommandID

Message Id. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, 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 nError will be set to an error code (usually ERROR_TRANSFER_ABORTED)

uParams

The number of parameters for this command.

pParams

Pointer to an array of PARAMETER structures that contain the parameters for the command.

uExtra

Length of any extra data sent with the command.

pExtra

Pointer to the extra data sent with the command.

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.

Returns

None

Comments

A call to this function is generated when a computer receives a command request from a remote computer.

To use this callback function, it must be set using L_InetSetCommandCallback. If this callback function is not set, INETCALLBACK will be called instead.

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_InetSetCommandCallback, INETRESPONSECALLBACK, L_InetSetResponseCallback

Topics:

Sending Commands and Responses

 

A Client-Server Diagram: Sending Commands and Responses

Example

For an example, refer to L_InetSetCommandCallback.