CardRequestExclusive

This function requests exclusive access to a specified socket and function pair.

Syntax

STATUS CardRequestExclusive( CARD_CLIENT_HANDLE hCardClient CARD_SOCKET_HANDLE hSocket );

Parameters

hCardClient
Client handle obtained from the CardRegisterClient function.
hSocket
Handle to a socket and function pair.

Return Values

CERR_SUCCESS indicates success. One of the following values indicates failure:

CERR_BAD_HANDLE
Indicates that the driver handle specified for hCardClient is invalid.
CERR_BAD_SOCKET
Indicates that the socket identifier specified for hSocket is invalid or that no PC Card is inserted.
CERR_IN_USE
Indicates that another driver owns exclusive access.

Remarks

This function signals Card Services to issue a series of callback events services as it negotiates for approval with each registered driver. First, Card Services sends a CE_EXCLUSIVE_REQUEST event code to all registered drivers to determine if they enable exclusive use. If all the drivers approve the request, Card Services then sends each driver a CE_CARD_REMOVAL event code. Finally, it sends a CE_CARD_INSERTION event code to the requesting driver followed by a CE_EXCLUSIVE_COMPLETE event code. If any of the drivers do not approve, Card Services sends the requesting driver a CE_EXCLUSIVE_COMPLETE event code with a failing status in Parm1 member of the CARD_EVENT_PARMS structure.

Driver Name

PCMCIA

See Also

CardReleaseExclusive