BarcodeScanner BarcodeScanner BarcodeScanner BarcodeScanner BarcodeScanner Class


Represents the barcode scanner device.

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

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)


This object is created when GetDefaultAsync or FromIdAsync method completes.

See the barcode scanner sample for an example implementation.

Version history

Windows version SDK version Value added
1607 14393 VideoDeviceId
1703 15063 GetDeviceSelector(PosConnectionTypes)


Capabilities Capabilities Capabilities Capabilities Capabilities

Gets the capabilities of the specified barcode scanner.

DeviceId DeviceId DeviceId DeviceId DeviceId

Gets the DeviceInformation.Id of the barcode scanner.

VideoDeviceId VideoDeviceId VideoDeviceId VideoDeviceId VideoDeviceId

Retrieves the video device ID which represents the camera lens associated with the claimed barcode scanner. (Not supported on mobile platforms)


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

Tests the state of the barcode scanner.

ClaimScannerAsync() ClaimScannerAsync() ClaimScannerAsync() ClaimScannerAsync() ClaimScannerAsync()

Attempts to get an exclusive access to the barcode scanner.

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

Close the barcode scanner session, allowing it to be claimed by another client. 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 BarcodeScanner object from the DeviceInformation.Id.

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

Returns the first available barcode scanner.

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

Gets an Advanced Query Syntax (AQS) string that you can use to list the available barcode scanners.

GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes) GetDeviceSelector(PosConnectionTypes)

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

GetSupportedProfiles() GetSupportedProfiles() GetSupportedProfiles() GetSupportedProfiles() GetSupportedProfiles()

Gets the list of profiles supported by the barcode scanner.

GetSupportedSymbologiesAsync() GetSupportedSymbologiesAsync() GetSupportedSymbologiesAsync() GetSupportedSymbologiesAsync() GetSupportedSymbologiesAsync()

Gets the symbologies supported by the claimed barcode scanner.

IsProfileSupported(String) IsProfileSupported(String) IsProfileSupported(String) IsProfileSupported(String) IsProfileSupported(String)

Determines whether the profile is supported.

IsSymbologySupportedAsync(UInt32) IsSymbologySupportedAsync(UInt32) IsSymbologySupportedAsync(UInt32) IsSymbologySupportedAsync(UInt32) IsSymbologySupportedAsync(UInt32)

Determines whether the specified symbology is supported by the barcode scanner.

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

Retrieves the requested statistics from the barcode scanner.


StatusUpdated StatusUpdated StatusUpdated StatusUpdated StatusUpdated

Occurs when the barcode scanner detects an operation status change.