CardGetNextTuple

The CardGetNextTuple function retrieves the next tuple of the specified type for the specified socket and function.

Syntax

STATUS CardGetNextTuple( PCARD_TUPLE_PARMS pGetTupleParms );

Parameters

pGetTupleParms
Points to a CARD_TUPLE_PARMS structure.

Return Values

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

Value Description
CERR_BAD_ARGS Indicates an invalid pGetTupleParms pointer.
CERR_BAD_SOCKET Indicates an invalid hSocket socket identifier in the CARD_TUPLE_PARMS structure or there is no PC Card inserted in the socket.
CERR_NO_MORE_ITEMS Indicates the end of CIS reached or requested tuple not found.
CERR_OUT_OF_RESOURCE Indicates Card Services 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 follows the CIS tuple chain as specified by the uLinkOffset, uCISOffset, and fFlags members of the CARD_TUPLE_PARMS structure. These members were set by a previous call to CardGetFirstTuple or CardGetNextTuple.

To obtain tuple data, use CardGetTupleData.

The driver should retain the values returned in the uLinkOffset, uCISOffset and fFlags members of the CARD_TUPLE_PARMS structure so that subsequent calls to CardGetNextTuple or CardGetTupleData can follow the tuple chain. The driver should only access the members uTupleCode and uTupleLink if the return value is CERR_SUCCESS.

The CARD_TUPLE_PARMS and CARD_DATA_PARMS structures are arranged so that their corresponding members are aligned. With care, drivers can use a single buffer in all calls to the Card Services tuple functions.

See Also

CARD_DATA_PARMS_wceddk_CARD_DATA_PARMS, CARD_TUPLE_PARMS_wceddk_CARD_TUPLE_PARMS, CardGetFirstTuple_wceddk_CardGetFirstTuple, CardGetTupleData_wceddk_CardGetTupleData, PC Card Tuple Codes_wceddk_PC_Card_Tuple_Codes