MagneticStripeReader MagneticStripeReader MagneticStripeReader MagneticStripeReader MagneticStripeReader Class

Definition

Represents the magnetic stripe reader device.

public : sealed class MagneticStripeReader : IClosable
struct winrt::Windows::Devices::PointOfService::MagneticStripeReader : IClosable
public sealed class MagneticStripeReader : IDisposable
Public NotInheritable Class MagneticStripeReader Implements IDisposable
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

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

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 Capabilities Capabilities Capabilities Capabilities

Gets the capabilities of the magnetic stripe reader.

DeviceAuthenticationProtocol DeviceAuthenticationProtocol DeviceAuthenticationProtocol DeviceAuthenticationProtocol DeviceAuthenticationProtocol

Device authentication protocol supported by the magnetic stripe reader.

DeviceId DeviceId DeviceId DeviceId DeviceId

Gets the DeviceInformation.Id of the magnetic stripe reader.

SupportedCardTypes SupportedCardTypes SupportedCardTypes SupportedCardTypes SupportedCardTypes

Gets the card types supported by the magnetic stripe reader.

Methods

CheckHealthAsync(UnifiedPosHealthCheckLevel) CheckHealthAsync(UnifiedPosHealthCheckLevel) CheckHealthAsync(UnifiedPosHealthCheckLevel) CheckHealthAsync(UnifiedPosHealthCheckLevel) CheckHealthAsync(UnifiedPosHealthCheckLevel)

Tests the health of the magnetic stripe reader.

ClaimReaderAsync() ClaimReaderAsync() ClaimReaderAsync() ClaimReaderAsync() ClaimReaderAsync()

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

Close() Close() Close() Close() Close()

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

Dispose() Dispose() Dispose() Dispose() Dispose()

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

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Creates a MagneticStripeReader object from DeviceInformation.Id.

GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync()

Returns the first magnetic stripe reader found.

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

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

GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) 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() GetErrorReportingType() GetErrorReportingType() GetErrorReportingType() GetErrorReportingType()

Gets the error reporting type the application wants to receive.

RetrieveStatisticsAsync(IIterable<String>) RetrieveStatisticsAsync(IIterable<String>) RetrieveStatisticsAsync(IIterable<String>) RetrieveStatisticsAsync(IIterable<String>) RetrieveStatisticsAsync(IIterable<String>)

Retrieves the requested statistics from the magnetic stripe reader.

Events

StatusUpdated StatusUpdated StatusUpdated StatusUpdated StatusUpdated

Occurs when the device detects an operation status change.