Share via


SmartCardReader Class

Definition

Represents info about a smart card reader.

The Smart cards sample application shows how to use Windows.Devices.SmartCards APIs to work with smart cards and smart card readers programmatically. The Near field communication (NFC) sample application also shows how to communicate with a smart card.

public ref class SmartCardReader sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SmartCardReader final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SmartCardReader
Public NotInheritable Class SmartCardReader
Inheritance
Object Platform::Object IInspectable SmartCardReader
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

DeviceId

Gets the smart card reader's device ID.

Kind

Gets the smart card reader's type.

Name

Gets the smart card reader's device name.

Methods

FindAllCardsAsync()

Returns a list of info about all smart cards that are connected to the smart card reader.

FromIdAsync(String)

Returns a smart card reader that matches the specified device ID.

GetDeviceSelector()

Returns an Advanced Query Syntax (AQS) string representing all smart card readers connected to the device. This string is passed to the FindAllAsync method to enumerate the given set of smart card readers.

GetDeviceSelector(SmartCardReaderKind)

Returns an Advanced Query Syntax (AQS) string representing a set of a specific type of smart card readers connected to the device. This string is passed to the FindAllAsync method to enumerate the given set of smart card readers.

GetStatusAsync()

Returns the smart card reader's status.

Events

CardAdded

Occurs when a smart card is inserted into the smart card reader or tapped on an NFC reader.

CardRemoved

Occurs when a smart card is taken out of the smart card reader.

Applies to

See also