L_InetSetResponseCallback

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

L_LTNET_API L_INT L_InetSetResponseCallback(hComputer, pfnCallback, pUserData)

L_COMP hComputer;

/* computer to associate the callback data with */

INETRESPONSECALLBACK pfnCallback;

/* callback to associate */

L_VOID * pUserData;

/* user data to associate */

Sets the response callback function to use for incoming responses.

Parameter Description

hComputer

Handle of the host computer to be associated with the callback.

pfnCallback

Pointer to an optional callback. You can pass NULL if you want the default INETCALLBACK to be called when a command request is received.

pUserData

Void pointer that can be used to access a variable or structure containing data that the callback function needs. This gives you a way to receive data indirectly from the function that uses this callback.

 

Keep in mind that this is a void pointer, which must be cast to the appropriate data type within the callback function.

Returns

SUCCESS

This function was successful.

< 1

An occurred. Refer to Return Codes.

Comments

This function sets a specialized callback to handle the incoming responses. By default, the INETCALLBACK handles the responses. But INETCALLBACK is not suitable for handling the response parameters and extra data. Use an INETRESPONSECALLBACK function to process the responses properly.

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:

INETRESPONSECALLBACK, L_InetSetCommandCallback, INETCOMMANDCALLBACK

Topics:

Sending Commands and Responses

 

A Client-Server Diagram: Sending Commands and Responses

Example

For an example, refer to L_InetSetCommandCallback.