SCardSetAttrib

The SCardSetAttrib function sets the given reader attribute for the given handle. It does not affect the state of the reader, reader driver, or smart card. Not all attributes are supported by all readers (nor can they be set at all times) as many of the attributes are under direct control of the transport protocol.

LONG SCardSetAttrib(
  IN SCARDHANDLE hCard,
  IN dwAttrId, 
  IN LPCBYTE pbAttr,
  IN DWORD pbAttrLength
);
 

Parameters

hCard
Supplies the reference value returned from SCardConnect.
dwAttrId
Supplies the identifier for the attribute to get.
pbAttr
Points to a buffer that supplies the attribute whose ID is supplied in dwAttrId.
cbAttrLength
Supplies the length (in bytes) of the attribute value in the pbAttr buffer.

Return Values

If the function… The return value is…
Succeeds SCARD_S_SUCCESS.
Fails An error code (see Error Codes for a list of all error codes).

Remarks

SCardSetAttrib is a direct card access function. For a description of other direct access functions, see Direct Card Access Functions.

QuickInfo

  Windows NT: Use version 4.0 SP3 and later.
  Windows: Use Windows 95 OSR2.1.
  Windows CE: Unsupported.
  Header: Declared in winscard.h.
  Import Library: Link with winscard.lib.

See Also

SCardConnect, SCardGetAttrib