CLIENT_CALLBACK

This structure specifies the prototype for PC Card event callback functions. The Card Services driver calls the callback function to notify the stream interface device driver of a PC Card event.

Syntax

typedef STATUS (
*CLIENT_CALLBACK)
(
CARD_EVENT CardEvent
CARD_SOCKET_HANDLE hSocket
PCARD_EVENT_PARMS pCardEventParms );

Members

CardEvent
Specifies one of the Card Services callback event values.
hSocket
Handle to a socket and function pair.
pCardEventParms
Pointer to the members associated with CardEvent.

Return Values

CERR_SUCCESS indicates success. One of the following indicates failure:

CERR_BAD_ARGS
Indicates that the pointer specified for pCardEventParms is invalid.
CERR_BAD_SOCKET
Indicates that the socket identifier specified for hSocket is invalid or that a PC Card is not inserted.

Remarks

When a PC Card event occurs, Card Services notifies drivers by calling their registered callback functions. The callback function must conform to the CLIENT_CALLBACK prototype.

Drivers can request notice for certain events when they register with the CardRegisterClient function.

You can use the CardRequestSocketMask and CardSetEventMask functions to request event notification for a specific socket and function pair.

See Also

CardRegisterClient, CardRequestSocketMask, CardSetEventMask