Microsoft Windows CE 3.0  

CardGetParsedTuple

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 reads and decodes the CISTPL_CONFIG and CISTPL_CFTABLE_ENTRY tuples. These tuples are both complex and difficult to decode; this function stores the information in those tuples in data structures that are easier to access.

STATUS CardGetParsedTuple(
CARD_SOCKET_HANDLE
hSocket
UINT8
uDesiredTuple
PVOID
pBuf
PUINT32
pnItems
);

Parameters

hSocket
Handle to a socket and function pair.
uDesiredTuple
Specifies the desired tuple to parse. Currently, only the CISTPL_CONFIG or CISTPL_CFTABLE_ENTRY tuples are supported for parsing.
pBuf
Pointer to the buffer to contain the parsed tuple information. Points to the PARSED_CONFIGor the PARSED_CFTABLEstructure.
pnItems
Pointer, on entry, to the number of entries in the buffer pointed to by pBuf. On exit, this parameter specifies how many entries of pBufare needed to store the results or how many entries are required if the buffer is not large enough.

Return Values

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

CERR_BAD_ARG_LENGTH
Indicates that the buffer specified by the pnItemspointer is not large enough.
CERR_BAD_ARGS
Indicates that the pointer specified by pBufis invalid.
CERR_BAD_SOCKET
Indicates that an hSocketsocket identifier is invalid or that a PC Card is not inserted.
CERR_NO_MORE_ITEMS
Indicates that the end of CIS is reached or that the requested tuple is 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 reads the CIS data from the specified PC Card of the specified tuple code and formats the encoded data into an easily accessed structure. This function reduces code size by eliminating extra processing required to parse some variable-length tuples, thus duplication of code to process these tuples.

Currently, Windows CE supports only the CISTPL_CONFIG and CISTPL_CFTABLE_ENTRY tuples for parsing.

When this function is called with CISTPL_CONFIG, it retrieves a PARSED_CONFIGstructure. When it is called with CISTPL_CFTABLE_ENTRY, it retrieves a PARSED_CFTABLEstructure. Therefore, the pBufpointer points to either PARSED_CONFIGor PARSED_CFTABLE.

If there are multiple CISTPL_CFTABLE_ENTRY tuples, this function retrieves the required number of PARSED_CFTABLEstructures, provided the user's buffer is large enough.

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

PARSED_CFTABLE, PARSED_CONFIG, POWER_DESCR



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.