Share via


MagneticStripeReader Class

Definition

Represents the magnetic stripe reader device.

public ref class MagneticStripeReader sealed
public ref class MagneticStripeReader sealed : IClosable
/// [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 MagneticStripeReader final
/// [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 MagneticStripeReader final : IClosable
[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 MagneticStripeReader
[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 MagneticStripeReader : System.IDisposable
Public NotInheritable Class MagneticStripeReader
Public NotInheritable Class MagneticStripeReader
Implements IDisposable
Inheritance
Object Platform::Object IInspectable MagneticStripeReader
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

This object is created when GetDefaultAsync or FromIdAsync method completes.

See the magnetic stripe reader sample for an example implementation.

Version history

Windows version SDK version Value added
1703 15063 GetDeviceSelector(PosConnectionTypes)

Properties

Capabilities

Gets the capabilities of the magnetic stripe reader.

DeviceAuthenticationProtocol

Device authentication protocol supported by the magnetic stripe reader.

DeviceId

Gets the DeviceInformation.Id of the magnetic stripe reader.

SupportedCardTypes

Gets the card types supported by the magnetic stripe reader.

Methods

CheckHealthAsync(UnifiedPosHealthCheckLevel)

Tests the health of the magnetic stripe reader.

ClaimReaderAsync()

Attempts to get an exclusive access to the magnetic stripe reader.

Close()

Close the magnetic stripe reader session. For C++ and JavaScript, use Close(). For C# and Visual Basic, use Dispose().

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FromIdAsync(String)

Creates a MagneticStripeReader object from DeviceInformation.Id.

GetDefaultAsync()

Returns the first magnetic stripe reader found.

GetDeviceSelector()

Returns an Advanced Query Syntax (AQS) string that is used to enumerate available magnetic stripe readers.

GetDeviceSelector(PosConnectionTypes)

Gets an Advanced Query Syntax (AQS) string that you can use to list the magnetic stripe readers available over the specified connection types

GetErrorReportingType()

Gets the error reporting type the application wants to receive.

RetrieveStatisticsAsync(IIterable<String>)

Retrieves the requested statistics from the magnetic stripe reader.

Events

StatusUpdated

Occurs when the device detects an operation status change.

Applies to