Share via


ClaimedBarcodeScanner Class

Definition

Represents the claimed barcode scanner.

public ref class ClaimedBarcodeScanner 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 ClaimedBarcodeScanner final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ClaimedBarcodeScanner 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 ClaimedBarcodeScanner : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ClaimedBarcodeScanner : System.IDisposable
Public NotInheritable Class ClaimedBarcodeScanner
Implements IDisposable
Inheritance
Object Platform::Object IInspectable ClaimedBarcodeScanner
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

The object is created when ClaimScannerAsync method completes.

Version history

Windows version SDK version Value added
1703 15063 GetSymbologyAttributesAsync
1703 15063 SetSymbologyAttributesAsync
1803 17134 HideVideoPreview
1803 17134 IsVideoPreviewShownOnEnable
1803 17134 ShowVideoPreviewAsync
1809 17763 Closed

Properties

DeviceId

Gets the DeviceInformation.Id of the claimed barcode scanner.

IsDecodeDataEnabled

Gets or sets a Boolean value that indicates whether to provide the decoded data to the service object.

IsDisabledOnDataReceived

Gets or sets a Boolean value that indicates whether the barcode scanner is disabled after receiving the data.

IsEnabled

Indicates whether the barcode scanner can receive DataReceived events.

IsVideoPreviewShownOnEnable

Gets or sets whether to show the video preview window when the barcode scanner is enabled.

Methods

Close()

Releases exclusive claim to the barcode scanner. For C++ and JavaScript, use Close(). For C# and Visual Basic, use Dispose().

DisableAsync()

Puts the barcode scanner into a state where it cannot receive DataReceived events.

Dispose()

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

EnableAsync()

Gets the barcode scanner into a ready state for DataReceived events.

GetSymbologyAttributesAsync(UInt32)

Gets the attributes of the specified barcode symbology.

HideVideoPreview()

Hides the video preview window.

ResetStatisticsAsync(IIterable<String>)

Resets the specified statistics to zero for all statistics that can be reset.

RetainDevice()

Retains exclusive claim to the barcode scanner.

SetActiveProfileAsync(String)

Sets the active profile on the barcode scanner.

Important

This API applies only to Build 10240 and Build 10586 of the Windows Mobile device family (Windows Mobile Extensions for the UWP). This API doesn't apply to the Windows Desktop device family, nor to other device families, nor to builds of Windows Mobile other than 10240 and 10586. When called on an operating system (OS) to which it doesn't apply, the behavior of this API is undefined. For more info about device families, see Device family extension SDKs and API contracts.

SetActiveSymbologiesAsync(IIterable<UInt32>)

Sets the barcode symbologies for the device to use.

SetSymbologyAttributesAsync(UInt32, BarcodeSymbologyAttributes)

Sets the attributes of the barcode symbology used by the claimed barcode scanner.

ShowVideoPreviewAsync()

Shows the video preview window.

StartSoftwareTriggerAsync()

Used to signal the barcode scanner to start scanning. A session is active until StopSoftwareTriggerAsync is invoked, or until the scanner ends the session on its own.

StopSoftwareTriggerAsync()

Used to stop a session that was started with StartSoftwareTriggerAsync. No error is raised if this is called when no session is active.

UpdateStatisticsAsync(IIterable<KeyValuePair<String,String>>)

Updates the specified statistics.

Events

Closed

Event that is raised when the ClaimedBarcodeScanner is closed.

DataReceived

Occurs when the device scans a barcode.

ErrorOccurred

Occurs when there is a problem in reading a barcode.

ImagePreviewReceived

Occurs when the device receives the bitmap image of the scan.

ReleaseDeviceRequested

Occurs when the device gets a request to release its exclusive claim.

TriggerPressed

Occurs when the barcode scanner trigger or button is pressed during a scanning operation.

TriggerReleased

Occurs when the barcode scanner trigger or button is released during a scanning operation.

Applies to

See also