The CardGetStatus function retrieves the current status of the specified socket and function pair.
STATUS CardGetStatus( PCARD_STATUS pStatus );
CardGetStatus returns CERR_SUCCESS if it is able to place status information in the CARD_STATUS structure referenced by the pStatus parameter. If the CARD_STATUS structure referenced by the pStatus parameter contains invalid information in its hSocket field, CardGetStatus should return CERR_BAD_SOCKET. If the pStatus parameter itself is invalid, CardGetStatus should return CERR_BAD_ARGS.
Status can be such things as write protect, card lock, and battery dead. You can determine these changes from bit mask values that this function retrieves in the CARD_STATUS structure.
PC Card Event Masks, CARD_STATUS
The CardGetTupleData function reads the data from the current tuple.
STATUS CardGetTupleData( PCARD_DATA_PARMS pTupleDataParms );
If the function succeeds, the return value is CERR_SUCCESS; otherwise, it is one of the following:
Value | Description |
---|---|
CERR_BAD_ARG_LENGTH | Indicates the buffer specified by uBufLen in the CARD_DATA_PARMS structure is not large enough. |
CERR_BAD_ARGS | Indicates the pTupleDataParms pointer is invalid. |
CERR_BAD_SOCKET | Indicates an invalid hSocket socket identifier in the CARD_TUPLE_PARMS structure, or a PC Card not inserted. |
CERR_NO_MORE_ITEMS | Indicates the end of CIS reached or the requested tuple not found. |
CERR_OUT_OF_RESOURCE | Indicates 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. |
This function returns data from the tuple specified by the fFlags, uLinkOffset, and uCISOffset members in the CARD_DATA_PARMS structure. These member values are maintained by the driver whenever CardGetFirstTuple and CardGetNextTuple are called.
CARD_DATA_PARMS, CARD_TUPLE_PARMS, CardGetFirstTuple, CardGetNextTuple