BarcodeScanner Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the barcode scanner device.
public ref class BarcodeScanner sealed
public ref class BarcodeScanner 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 BarcodeScanner 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 BarcodeScanner 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 BarcodeScanner
[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 BarcodeScanner : System.IDisposable
Public NotInheritable Class BarcodeScanner
Public NotInheritable Class BarcodeScanner
Implements IDisposable
- Inheritance
- Attributes
- Implements
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)
|
This object is created when GetDefaultAsync or FromIdAsync method completes.
See the barcode scanner sample for an example implementation.
Windows version | SDK version | Value added |
---|---|---|
1607 | 14393 | VideoDeviceId |
1703 | 15063 | GetDeviceSelector(PosConnectionTypes) |
Capabilities |
Gets the capabilities of the specified barcode scanner. |
Device |
Gets the DeviceInformation.Id of the barcode scanner. |
Video |
Retrieves the video device ID which represents the camera lens associated with the claimed barcode scanner. (Not supported on mobile platforms) |
Check |
Tests the state of the barcode scanner. |
Claim |
Attempts to get an exclusive access to the barcode scanner. |
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() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
From |
Creates BarcodeScanner object from the DeviceInformation.Id. |
Get |
Returns the first available barcode scanner. |
Get |
Gets an Advanced Query Syntax (AQS) string that you can use to list the available barcode scanners. |
Get |
Gets an Advanced Query Syntax (AQS) string that you can use to list the barcode scanners available over the specified connection types |
Get |
Gets the list of profiles supported by 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. |
Get |
Gets the symbologies supported by the claimed barcode scanner. |
Is |
Determines whether the profile is supported. 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. |
Is |
Determines whether the specified symbology is supported by the barcode scanner. |
Retrieve |
Retrieves the requested statistics from the barcode scanner. |
Status |
Occurs when the barcode scanner detects an operation status change. |