Share via


BarcodeScannerProviderConnection Class

Definition

Represents a connection to a barcode scanner provider client.

public ref class BarcodeScannerProviderConnection sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BarcodeScannerProviderConnection final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class BarcodeScannerProviderConnection final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BarcodeScannerProviderConnection : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class BarcodeScannerProviderConnection : System.IDisposable
Public NotInheritable Class BarcodeScannerProviderConnection
Implements IDisposable
Inheritance
Object Platform::Object IInspectable BarcodeScannerProviderConnection
Attributes
Implements

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)

Remarks

Use the instance of this class provided by the Connection property of the BarcodeScannerProviderTriggerDetails object passed to your background task on activation.

Version history

Windows version SDK version Value added
1809 17763 CreateFrameReaderAsync
1809 17763 CreateFrameReaderAsync(BitmapPixelFormat)
1809 17763 CreateFrameReaderAsync(BitmapPixelFormat,BitmapSize)

Properties

CompanyName

Gets or sets the company name of the barcode scanner provider.

Id

Gets the ID of the barcode scanner provider connection.

Name

Gets or sets the name of the barcode scanner provider.

SupportedSymbologies

Gets the supported symbologies of the barcode scanner provider.

Version

Gets or sets the version of the barcode scanner provider.

VideoDeviceId

Gets the video device ID that represents the camera lens associated with the barcode scanner.

Methods

Close()

Closes the barcode scanner provider connection session.

CreateFrameReaderAsync()

Creates a new BarcodeScannerFrameReader instance.

CreateFrameReaderAsync(BitmapPixelFormat, BitmapSize)

Creates a new BarcodeScannerFrameReader instance that returns frames in the preferred format and size when possible.

CreateFrameReaderAsync(BitmapPixelFormat)

Creates a new BarcodeScannerFrameReader instance that returns frames in the preferred format when possible.

Dispose()

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

ReportErrorAsync(UnifiedPosErrorData, Boolean, BarcodeScannerReport)

Sends an error report to the client app.

ReportErrorAsync(UnifiedPosErrorData)

Sends an error report to the client app.

ReportScannedDataAsync(BarcodeScannerReport)

Sends a barcode scanner data report to the client app.

ReportTriggerStateAsync(BarcodeScannerTriggerState)

Sends a barcode scanner trigger state update to the client app during a scanning operation.

Start()

Starts the connection for data transfer.

Events

DisableScannerRequested

Raised when the client app attempts to disable the barcode scanner.

EnableScannerRequested

Raised when the client app attempts to enable the barcode scanner.

GetBarcodeSymbologyAttributesRequested

Raised when the client app attempts to get the attributes of a barcode symbology.

HideVideoPreviewRequested

Raised when the client app attempts to hide a video preview window.

SetActiveSymbologiesRequested

Raised when the client app attempts to set the barcode symbologies for the device to use.

SetBarcodeSymbologyAttributesRequested

Raised when the client app attempts to set the attributes of a barcode symbology.

StartSoftwareTriggerRequested

Raised when the client app attempts to signal the barcode scanner to start scanning.

StopSoftwareTriggerRequested

Raised when the client app attempts to signal the barcode scanner to stop scanning.

Applies to