CardRequestSocketMask

The CardRequestSocketMask function associates a socket and function pair with an event mask for the driver. Card Services callbacks to the driver are then limited to those associated with the events specified in the mask.

Syntax

STATUS CardRequestSocketMask( CARD_CLIENT_HANDLE hCardClient CARD_SOCKET_HANDLE hSock UINT16 fEventMask );

Parameters

hCardClient
Specifies a client handle obtained from CardRegisterClient.
hSock
Specifies the handle to a socket and function pair.
fEventMask
Specifies a Bitmask indicating the events that trigger a callback. The allowable card events are listed in the CardServ.h header file.

Return Values

If the function succeeds, the return value is CERR_SUCCESS; otherwise, it is one of the following:

Value Description
CERR_BAD_HANDLE Indicates the driver handle specified for hCardClient is invalid.
CERR_BAD_SOCKET Indicates the socket identifier specified for hSock is invalid.

Remarks

An event mask should not be confused with the global event mask, which pertains to all sockets and is set by CardRegisterClient.

CardSetEventMask can change either a socket-specific event mask or the mask specified by CardRegisterClient.

See Also

CardReleaseSocketMask