Microsoft Windows CE 3.0  

CardGetFirstTuple

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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

STATUS
CardGetFirstTuple(
PCARD_TUPLE_PARMS
pGetTupleParms
);

Parameters

pGetTupleParms
Pointer to a CARD_TUPLE_PARMSstructure.

Return Values

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

CERR_BAD_ARGS
Indicates that the pointer specified for pGetTupleParmsis invalid.
CERR_BAD_SOCKET
Indicates that the socket identifier specified for the hSocketmember of CARD_TUPLE_PARMSis invalid or that there is no PC Card inserted in the socket.
CERR_NO_MORE_ITEMS
Indicates that the end of the CIS was reached or that the requested tuple was not found.
CERR_OUT_OF_RESOURCE
Indicates that Card Services was 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 uDesiredTuplemember of CARD_TUPLE_PARMS. A uDesiredTuplevalue of 0xFF indicates that all tuples are returned. The driver retains the values returned in the uLinkOffset, uCISOffset, and fFlagsmembers of CARD_TUPLE_PARMSso that subsequent calls to the CardGetNextTupleor CardGetTupleDatafunctons follow the tuple chain. The uTupleCodeand uTupleLinkmembers are ignored when the return value is not CERR_SUCCESS.

To obtain tuple data, call CardGetTupleData.

CARD_TUPLE_PARMSand the CARD_DATA_PARMSstructure 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. The socket is turned off if no drivers have any memory windows open on the PC Card.

Driver name

PCMCIA

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later      
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CARD_DATA_PARMS, CARD_TUPLE_PARMS, CardGetNextTuple, CardGetTupleData



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.