Share via


CardRequestExclusive (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

STATUS CardRequestExclusive(
  CARD_CLIENT_HANDLE hCardClient,
  CARD_SOCKET_HANDLE hSocket 
);

Parameters

  • hSocket
    [in] Handle to a socket and function pair.

Return Value

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

  • CERR_BAD_HANDLE
    Indicates that the driver handle specified for hCardClient is not valid.
  • CERR_BAD_SOCKET
    Indicates that the socket identifier specified for hSocket is not valid.
  • CERR_NO_CARD
    Indicates that no PC Card is inserted.

Remarks

This function signals card services to issue a series of callback events as it negotiates for approval from each registered driver. First, card services sends a CE_EXCLUSIVE_REQUEST event code to all registered drivers to determine if they allow exclusive use. If all drivers approve the request, card services 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 drivers do not approve, card services sends the requesting driver a CE_EXCLUSIVE_COMPLETE event code with a failing status in the Parm1 member of the CARD_EVENT_PARMS structure.

Requirements

Header cardsv2.h
Library Pcc_serv.dll
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

PC Card Driver Functions
CardReleaseExclusive
CARD_EVENT_PARMS