Share via


CardGetFirstTuple

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This function retrieves the first tuple of the specified type for the specified socket and function.

Syntax

STATUS CardGetFirstTuple(
  PCARD_TUPLE_PARMS pGetTupleParms 
);

Parameters

Return Value

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

  • CERR_BAD_ARGS
    Indicates that the pointer specified for pGetTupleParms is not valid.
  • CERR_BAD_SOCKET
    Indicates that the socket identifier specified for the hSocket member of CARD_TUPLE_PARMS is not valid or that there is no PC Card inserted in the socket.
  • CERR_NO_MORE_ITEMS
    Indicates that the end of the card information structure (CIS) was reached or that the requested tuple was not found.
  • CERR_OUT_OF_RESOURCE
    Indicates that card services is unable to set up a memory window to read the CIS.
  • CERR_READ_FAILURE
    Indicates that no PC Card is inserted or that the PC Card is unreadable.

Remarks

This function searches the CIS tuple chain in the PC Card's attribute memory for the tuple specified by the uDesiredTuple member of CARD_TUPLE_PARMS. A uDesiredTuple value of 0xFF indicates that all tuples are returned. The driver retains the values returned in the uLinkOffset, uCISOffset, and fFlags members of CARD_TUPLE_PARMS so that subsequent calls to the CardGetNextTuple or CardGetTupleData functions follow the tuple chain. The uTupleCode and uTupleLinkmembers are ignored when the return value is not CERR_SUCCESS.

To obtain tuple data, call CardGetTupleData.

CARD_TUPLE_PARMS and the CARD_DATA_PARMS structure are arranged so that their corresponding members are aligned. With care, a single buffer can be used in all calls to the card services tuple functions. This function turns on the PC Card socket, if it is not on already. The socket is turned off if no drivers have memory windows open on the PC Card.

Requirements

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

See Also

Reference

CARD_DATA_PARMS
CARD_TUPLE_PARMS
CardGetNextTuple
CardGetTupleData