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.Static(Windows.Devices.SmartCards.ISmartCardReaderStatics, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
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)]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.SmartCards.ISmartCardReaderStatics, 65536, "Windows.Foundation.UniversalApiContract")]
class SmartCardReader sealed
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.SmartCards.ISmartCardReaderStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SmartCardReader
[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)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.SmartCards.ISmartCardReaderStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class SmartCardReader
Public NotInheritable Class SmartCardReader
Inheritance
SmartCardReader
Attributes

Windows 10 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