4. Scanner3.DLL – Backward compatible API for PT930/PT930S’s Scanner3.dll

Note : For PA500, it need to dynamically load DLL for using Unitech built-in DLL (Unitech will not provide *.H and *.LIB for compiler), please refer to Chapter 7 for programming guide.

4.1.Enable Decoder

Function Description: This function will open COM2 port, create a thread to get any barcode input from Decoder Chip, and then store input data in the system buffer. Application can use function call PT_GetBarcode() to get input data from the system buffer.

Function call:

INT PT_EnableBarcode(VOID);

Return code:

=1 Create new thread fail

=2 Cannot re-enable

=3 Cannot open COM2

=4 Upload parameter from Hamster fail

=0 OK

4.2.Disable Decoder

Function Description:

This function will close COM2 port and then remove thread which is created by

PT_EnableBarcode()

Function call:

VOID PT_DisableBarcode( VOID );

4.3.Check barcode input

Function Description:

This function is used to check whether there is available barcode data on system buffer which is successfully decoded by decoder chip.

Function call:

BOOL PT_CheckBarcode( VOID );

Return code:

TRUE = There is input data on system buffer.

FALSE = There is no data on system buffer.

-

Page 21
Image 21
Unitech PA500 manual Disable Decoder, Check barcode input, Return code, PTEnableBarcode Function call