Share via


SCardSetAttrib

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function sets the specified reader attribute for the specified 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.

Syntax

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

Parameters

  • hCard
    [in] Handle to the reference value returned from SCardConnect.
  • dwAttrId
    [in] Specifies the identifier for the attribute to set.
  • pbAttr
    [in] Pointer to a buffer that supplies the attribute whose identifier is supplied in dwAttrId.
  • cbAttrLen
    [in] Count of bytes that represent the length of the attribute value in the pbAttr buffer.

Return Value

The following table shows the possible return values.

Value Description

SCARD_S_SUCCESS

Succeeds

An error value (see Smart Card Error Values for a list of all error values).

Fails

Remarks

SCardSetAttrib is a direct card access function.

Requirements

Header winscard.h
Library winscard.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

SCardConnect
SCardGetAttrib