2.2.2.21 GetAttrib_Call

The GetAttrib_Call structure is used to read smart card reader attributes.

 typedef struct _GetAttrib_Call {
   REDIR_SCARDHANDLE hCard;
   unsigned long dwAttrId;
   long fpbAttrIsNULL;
   unsigned long cbAttrLen;
 } GetAttrib_Call;

hCard: A handle, as specified in section 2.2.1.2.

dwAttrId: An identifier for the attribute to get. For more information on defined attributes, see [PCSC3] section 3.1.2.

fpbAttrIsNULL: A Boolean value specifying whether the caller wants to retrieve the length of the data. Set to FALSE (0x00000000) in order to allow the data to be returned. Set to TRUE (0x00000001) and only the length of the data will be returned.

Name

Value

FALSE

0x00000000

TRUE

0x00000001

cbAttrLen: The length of the buffer specified on the TS Server side. If cbAttrLen is set to SCARD_AUTOALLOCATE with a value of 0xFFFFFFFF then any buffer length can be returned. Otherwise, the returned buffer MUST NOT exceed cbAttrLen bytes in length. When the buffer to be returned exceeds cbAttrLen bytes in length, GetAttrib_Return.ReturnCode MUST be set to SCARD_E_INSUFFICIENT_BUFFER (0x80100008). The cbAttrLen field MUST be ignored if fpbAttrIsNULL is set to TRUE (0x00000001). Also, if fpbAttrIsNULL is set to FALSE (0x00000000) but cbAttrLen is set to 0x00000000, then the call MUST succeed, GetAttrib_Return.cbAttrLen MUST be set to the length of the data, in bytes, and GetAttrib_Return.pbAttr MUST be set to NULL.