Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

LONG SCardGetAttrib ( SCARDHANDLE  hCard,
DWORD  dwAttrId,
LPBYTE  pbAttr,
LPDWORD  pcbAttrLen 
)

This function get an attribute from the IFD Handler. The list of possible attributes is available in the file pcsclite.h.

Parameters:
[in] hCard Connection made from SCardConnect.
[in] dwAttrId Identifier for the attribute to get.
  • SCARD_ATTR_ASYNC_PROTOCOL_TYPES
  • SCARD_ATTR_ATR_STRING
  • SCARD_ATTR_CHANNEL_ID
  • SCARD_ATTR_CHARACTERISTICS
  • SCARD_ATTR_CURRENT_BWT
  • SCARD_ATTR_CURRENT_CLK
  • SCARD_ATTR_CURRENT_CWT
  • SCARD_ATTR_CURRENT_D
  • SCARD_ATTR_CURRENT_EBC_ENCODING
  • SCARD_ATTR_CURRENT_F
  • SCARD_ATTR_CURRENT_IFSC
  • SCARD_ATTR_CURRENT_IFSD
  • SCARD_ATTR_CURRENT_IO_STATE
  • SCARD_ATTR_CURRENT_N
  • SCARD_ATTR_CURRENT_PROTOCOL_TYPE
  • SCARD_ATTR_CURRENT_W
  • SCARD_ATTR_DEFAULT_CLK
  • SCARD_ATTR_DEFAULT_DATA_RATE
  • SCARD_ATTR_DEVICE_FRIENDLY_NAME_A
  • SCARD_ATTR_DEVICE_FRIENDLY_NAME_W
  • SCARD_ATTR_DEVICE_IN_USE
  • SCARD_ATTR_DEVICE_SYSTEM_NAME_A
  • SCARD_ATTR_DEVICE_SYSTEM_NAME_W
  • SCARD_ATTR_DEVICE_UNIT
  • SCARD_ATTR_ESC_AUTHREQUEST
  • SCARD_ATTR_ESC_CANCEL
  • SCARD_ATTR_ESC_RESET
  • SCARD_ATTR_EXTENDED_BWT
  • SCARD_ATTR_ICC_INTERFACE_STATUS
  • SCARD_ATTR_ICC_PRESENCE
  • SCARD_ATTR_ICC_TYPE_PER_ATR
  • SCARD_ATTR_MAX_CLK
  • SCARD_ATTR_MAX_DATA_RATE
  • SCARD_ATTR_MAX_IFSD
  • SCARD_ATTR_MAXINPUT
  • SCARD_ATTR_POWER_MGMT_SUPPORT
  • SCARD_ATTR_SUPRESS_T1_IFS_REQUEST
  • SCARD_ATTR_SYNC_PROTOCOL_TYPES
  • SCARD_ATTR_USER_AUTH_INPUT_DEVICE
  • SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE
  • SCARD_ATTR_VENDOR_IFD_SERIAL_NO
  • SCARD_ATTR_VENDOR_IFD_TYPE
  • SCARD_ATTR_VENDOR_IFD_VERSION
  • SCARD_ATTR_VENDOR_NAME
Not all the dwAttrId values listed above may be implemented in the IFD Handler you are using. And some dwAttrId values not listed here may be implemented.

Parameters:
[out] pbAttr Pointer to a buffer that receives the attribute.
pcbAttrLen [inout] Length of the pbAttr buffer in bytes.
Returns:
Error code.
Return values:
SCARD_S_SUCCESS Successful.
SCARD_E_NOT_TRANSACTED Data exchange not successful.
SCARD_E_INSUFFICIENT_BUFFER Reader buffer not large enough.
Test:
 LONG rv;
 SCARDCONTEXT hContext;
 SCARDHANDLE hCard;
 DWORD dwActiveProtocol;
 unsigned char pbAtr[MAX_ATR_SIZE];
 DWORD dwAtrLen;
 ...
 rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
 rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED,
                           SCARD_PROTOCOL_RAW &hCard, &dwActiveProtocol);
 rv = SCardGetAttrib(hCard, SCARD_ATTR_ATR_STRING, pbAtr, &dwAtrLen);

Definition at line 1196 of file winscard_scf.c.

Referenced by MSGFunctionDemarshall().

{
      return SCARD_E_NOT_TRANSACTED;
}


Generated by  Doxygen 1.6.0   Back to index