Datalogic .NET SDK
DecodeEvent (Constructor) (+1 overload)
Syntax
public DecodeEvent(DecodeHandle hDcd, DecodeRequest reqType);
Description
Constructor Datalogic.API.DecodeEvent class. When an instance of this class is created, an event listener will start to listen to the decoder.
Parameters Table
|
Type |
Parameter |
Description |
[in] |
DecodeHandle |
hDcd |
Handle to the decoding device to query. An instance of the Datalogic.API.DecodeHandle class represents this handle. |
[in] |
DecodeRequest |
reqType |
Type of event request being posted. It is a logical OR'ing of any of the Datalogic.API.DecodeRequest values. |
|
|
|
|
[return] |
- |
|
- |
[on error] |
GetLastWin32Error() |
|
When the method fails, System.Runtime.InteropServices.Marshal.GetLastWin32Error will return an integer representation of the Datalogic.API.DecodeErrorCode enumeration |
Example
private void foo() { DecodeHandle hDcd = new DecodeHandle( DecodeDeviceCap.Exists | DecodeDeviceCap.Barcode); DecodeRequest reqType = (DecodeRequest)1 | DecodeRequest.PostRecurring;
// Constructor dcdEvent = new DecodeEvent(hDcd, reqType);
// ... }
|
Remarks
Make sure to call Datalogic.API.DecodeEvent.StopScanListener when DecodeEvent no longer needs to listen to the decoder.
See Also
DecodeHandle (Class), Request (Enum), DecodeEvent.StopScanListener (Method), Example #021.
Copyright © Datalogic ADC. All Right Reserved