//-------------------------------------------------------------------------//
// ReaderDll  v2.51 head file
//-------------------------------------------------------------------------//
#include <windows.h>

//-------------------------------------------------------------------------//
#define    ID_MOD_1D                    1   // SE950,CCD 1D 
#define    ID_MOD_1D_ELR                2   // 1D Long Laser
#define    ID_MOD_2D                    4   // SE4407 2D
#define    ID_MOD_TI_RFID              16   // Texas Instrument RFID
#define    ID_MOD_RFID                 32   // RFID
#define    ID_MOD_2D_4507              64   // SE4507 2D
#define    ID_MOD_1D_955              128   // SE955  1D
#define    ID_MOD_MP_RFID             256   // Microprogram RFID

//-------------------------------------------------------------------------//
#define    NO_ACTIVE_DEVICE            0    // none
#define    DC_READER_BC                7    // barcode reader
#define    DC_READER_RFID              32   // RFID reader
#define    ALL_DEVICE                  255  // all device

//-------------------------------------------------------------------------//
#define    CMD_MAXLEN                  1024
#define    DATA_MAXLEN                 4096

//-------------------------------------------------------------------------//
#define    READ_UID                    1
#define    READ_DATA                   2

//-------------------------------------------------------------------------//
// error code
#define    W_READER_ALREADY_INIT       -51 

#define    E_READER_UNKNOWN_ERROR         0
#define    E_READER_NOT_INIT           -101
#define    E_READER_INIT_FAILED        -102
#define    E_NO_READER_INSTALLED       -103
#define    E_READER_BC_RESET_FAILED    -111
#define    E_READER_RFID_RESET_FAILED  -112
#define    E_READER_RESET_FAILED       -113
#define    E_READER_GET_PARAM_FAILED   -121
#define    E_READER_SET_PARAM_FAILED   -122
#define    E_READER_NO_SPEC_DC_BC      -131
#define    E_READER_NO_SPEC_DC_RFID    -132
#define    E_READER_NO_SPEC_DC         -133
#define    E_SOUND_INVALID_INDEX       -241
#define    E_SOUND_INVALID_PATH        -242
#define    E_SOUND_PALY_FAILED         -243
#define    E_VIBRATOR_INVALID_MODE     -251
#define    E_VIBRATOR_INVALID_DURATION -252
#define    E_WRONG_READER_TYPE         -253

#define    E_TAG_READ_FAILED           -272
#define    E_TAG_VALUE_OVER_RANGE      -273
#define    E_TAG_INVALID_LENGTH        -274
#define    E_TAG_GET_DATA_FAILED       -275
#define    E_TAG_WRITE_FAILED          -276
#define    E_TAG_CANNOT_WRITE          -277
#define    E_TAG_NO_TAG                -278
#define    E_TAG_WRITE_TIMEOUT         -279
#define    E_TAG_CANNOT_READ           -280
#define    E_TAG_READ_TIMEOUT          -281

#define    E_BUFF_IS_TOO_SMALL         -300

//-------------------------------------------------------------------------//
#define    DECODE_IMAGE                TEXT("WM_DECODEIMAGE")
#define    DECODE_BC                   TEXT("DecodeEventBC")
#define    DECODE_RFID                 TEXT("DecodeEventRFID")
#define    DECODE_MSG                  TEXT("WM_DECODEDATA")



typedef  INT (CALLBACK *INITREADER)(VOID); //InitReader
typedef  INT (CALLBACK *GETREADERTYPE)(VOID); //GetReaderType
typedef  INT (CALLBACK *GETTRIGGERKEYSTATUS)(VOID); //GetTriggerKeyStatus
typedef  INT (CALLBACK *SETTRIGGERKEY)(BOOL enable); //SetTriggerKey
typedef  INT (CALLBACK *GETACTIVEDEVICE)(VOID); //GetActiveDevice
typedef  INT (CALLBACK *SETACTIVEDEVICE)(INT actDC); //SetActiveDevice
typedef  INT (CALLBACK *GETDECODEDATA)(BYTE *buf, INT bufSize); //GetDecodeTagType
typedef  INT (CALLBACK *GETDECODETYPE)(VOID); //GetDecodeType
typedef  INT (CALLBACK *GETDECODERFIDDATA)(BYTE *buf, INT bufSize); //GetDecodeRfidData
typedef  INT (CALLBACK *GETDECODERFIDUID)(BYTE *buf, INT bufSize);  //GetDecodeRfidUID
typedef  INT (CALLBACK *RESETREADERTODEFAULT)(INT readerType); //ResetReaderToDefault
typedef  INT (CALLBACK *GETDECODETAGTYPE)(VOID); //GetDecodeTagType
typedef  INT (CALLBACK *WRITERFIDDATA)(BYTE *data, INT startByte, INT writeLen, INT *writtenBytes, INT timeout, INT mode, CHAR *loginKey, INT loginKeyType); //WriteRfidData
typedef  INT (CALLBACK *READRFIDDATA)(INT type, BYTE *readData, INT bufSize, INT startByte, INT readLen, INT timeout, CHAR *loginKey, INT loginKeyType); //ReadRfidData
typedef  INT (CALLBACK *READBARCODEDATA)(INT *codeType, CHAR *outBuf, INT bufSize, INT timeout); //ReadBarcodeData
typedef  INT (CALLBACK *BEEPER)(INT mode, BYTE *path); //Beeper
typedef  INT (CALLBACK *GETDLLVER)(CHAR *buf, INT bufSize); //GetDllVer
typedef  INT (CALLBACK *GETIMAGESIZE)(VOID); //GetImageSize
typedef  INT (CALLBACK *GETIMAGECONTENT)(BYTE *buf, INT bufSize); //GetImageContent
typedef  INT (CALLBACK *READIMAGE)(BYTE *buf, INT bufSize, INT *capturedImgSize); //ReadImage
typedef  INT (CALLBACK *CHANGEMIFAREKEY)(INT loginKeyType, INT useDefaultKey, INT defaultKeyIndex, INT targetSector, CHAR *loginKey, CHAR *newKeyA, CHAR *newKeyB, CHAR *accessControl); //ChangeMifareKey
typedef  INT (CALLBACK *GETOUTPUTRECORD)(INT target, CHAR *buf, INT bufSize); //GetOutputRecord
typedef  INT (CALLBACK *GETDECODERVERSION)(INT target, CHAR *buf, INT bufSize); //GetDecoderVersion 
typedef  INT (CALLBACK *CONVERTBYTETOWIDECHAR)(CHAR *inBuf, INT inBufLen, WCHAR *outBuf, INT outBufLen);


//================= 1D engine (CCD, SE950 Laser) ===========================================================
typedef INT (CALLBACK *USERPREFERENCES_1D)(INT rw, INT *scanMode, INT *readRedundancy, INT *timeout);
typedef INT (CALLBACK *CODABAR_1D)(INT rw, INT *enable, INT *startStopChar, INT *transmitStartStopChar);
typedef INT (CALLBACK *INDUSTRIAL25_1D)(INT rw, INT *enable, INT *checkDigitVerification, INT *transmitCheckDigit, INT *startStopPattern, INT *isMaxMinLengthFormat, INT *length1, INT *length2);
typedef INT (CALLBACK *INTERLEAVED25_1D)(INT rw, INT *enable, INT *checkDigitVerification, INT *transmitCheckDigit, INT *startStopPattern, INT *isMaxMinLengthFormat, INT *length1, INT *length2);
typedef INT (CALLBACK *MATRIX25_1D)(INT rw, INT *enable, INT *checkDigitVerification, INT *transmitCheckDigit, INT *startStopPattern, INT *isMaxMinLengthFormat, INT *length1, INT *length2);
typedef INT (CALLBACK *CODE39_1D)(INT rw, INT *enable, INT *checkDigitVerification, INT *transmitCheckDigit, INT *fullASCII, INT *transmitStartStopChar);
typedef INT (CALLBACK *CODE93_1D)(INT rw, INT *enable);
typedef INT (CALLBACK *CODE128_1D)(INT rw, INT *enable);
typedef INT (CALLBACK *ISBT128_1D)(INT rw, INT *enable);
typedef INT (CALLBACK *_GS1_128_1D)(INT rw, INT *enable, INT *wantCodeId, INT *GS1_128FieldSeparator);
typedef INT (CALLBACK *I_F_PHARMACODE_1D)(INT rw, INT *enable, INT *enableCIP39, INT *transmitCheckDigit, INT *transmitCIP39CheckDigit);
typedef INT (CALLBACK *MSI_1D)(INT rw, INT *enable, INT *checkDigitVerification, INT *transmitCheckDigit, INT *isMaxMinLengthFormat, INT *length1, INT *length2);
typedef INT (CALLBACK *NEGATIVEBARCODE_1D)(INT rw, INT *enable);
typedef INT (CALLBACK *PLESSEY_1D)(INT rw, INT *enable, INT *transmitCheckDigit, INT *convertToUKPlessey);
typedef INT (CALLBACK *GS1_DATABAR_1D)(INT rw, INT *enableGS1_DataBarLimited, INT *GS1_DataBarOmndirectionalAndExpanded, INT *transmitGS1_DataBarOmndirectionalCodeID, INT *transmitGS1_DataBarOmndirectionalApplicationID, INT *transmitGS1_DataBarOmndirectionalCheckDigit, INT *transmitGS1_DataBarLimitedCodeID, INT *transmitGS1_DataBarLimitedApplicationID, INT *transmitGS1_DataBarLimitedCheckDigit, INT *transmitGS1_DataBarExpandedCodeID);
typedef INT (CALLBACK *TELEPEN_1D)(INT rw, INT *enable, INT *enableAIM);
typedef INT (CALLBACK *EAN8_1D)(INT rw, INT *enable, INT *enableAddon2, INT *enableAddon5, INT *transmitCheckDigit, INT *convertToEAN13);
typedef INT (CALLBACK *EAN13UPCA_1D)(INT rw, INT *enable, INT *enableAddon2, INT *enableAddon5, INT *enableISBN, INT *enableISSN, INT *transmitEan13CheckDigit, INT *convertToEan13, INT *transmitUpcACheckDigit, INT *transmitSystemNumber);                       
typedef INT (CALLBACK *GTIN_1D)(INT rw, INT *enable);
typedef INT (CALLBACK *UPCE_1D)(INT rw, INT *enable, INT *enableAddon2, INT *enableAddon5, INT *enableUpcE1, INT *convertToUpcA, INT *transmitCheckDigit, INT *transmitSystemNumber, INT *enableUpcE1TripleCheck);

//================= 2D SE4407 engine ========================================================================
typedef INT (CALLBACK *UPC_2D)(INT rw, INT *enableUpcA, INT *enableUpcE, INT *enableUpcE1, INT *enableAddons, INT *addonsRedundancy, INT *transmitUpcACheckDigit, INT *transmitUpcECheckDigit, INT *transmitUpcE1CheckDigit, INT *preambleUpcA, INT *preambleUpcE, INT *preambleUpcE1, INT *convertUpcEToA, INT *convertUpcE1ToA, INT *uccCouponExtendedCode, INT *linearDecode);
typedef INT (CALLBACK *EANJAN_2D)(INT rw, INT *enableEanJan8, INT *enableEacJan13, INT *enableBooklandEan, INT *enableAddons, INT *addonsRedundancy, INT *enableEanJan8Extended, INT *uccCouponExtendedCode, INT *linearDecode);
typedef INT (CALLBACK *CODE39_2D)(INT rw, INT *enable, INT *enableTrioptic, INT *convertToCode32, INT *prefixCode32, INT *checkDigitVerification, INT *transmitCheckDigit, INT *fullASCII, INT *length1, INT *length2);
typedef INT (CALLBACK *CODE128_2D)(INT rw, INT *enable, INT *enableGS1_128, INT *enableISBT128);
typedef INT (CALLBACK *CODE93_2D)(INT rw, INT *enable, INT *length1, INT *length2);
typedef INT (CALLBACK *CODE11_2D)(INT rw, INT *enable, INT *numberOfCheckDigits, INT *transmitCheckDigit, INT *length1, INT *length2);
typedef INT (CALLBACK *INTERLEAVED2OF5_2D)(INT rw, INT *enable, INT *length1, INT *length2, INT *checkDigitVerification, INT *transmitCheckDigit, INT *convertToEan13);                       
typedef INT (CALLBACK *INDUSTRIAL2OF5_2D)(INT rw, INT *enable, INT *length1, INT *length2);
typedef INT (CALLBACK *CODABAR_2D)(INT rw, INT *enable, INT *length1, INT *length2, INT *enableCLSIEditing, INT *enableNOTISEditing);
typedef INT (CALLBACK *MSI_2D)(INT rw, INT *enable, INT *length1, INT *length2, INT *checkDigitVerification, INT *transmitCheckDigit, INT *checkDigitAlgorithm);                           
typedef INT (CALLBACK *POSTALCODE_2D)(INT rw, INT *enableUSPostnet, INT *enableUSPlanet, INT *enableUKPostal, INT *transmitUKCheckDigit, INT *enableJapanPostal, INT *enableAustralianPostal, INT *enableDutchPostal, INT *transmitUSCheckDigit);
typedef INT (CALLBACK *GS1_DATABAR_2D)(INT rw, INT *enableDataBarOmndirectional, INT *enableGS1_DataBarLimited, INT *transmitGS1_DataBarExpanded, INT *convertToUpcEan);
typedef INT (CALLBACK *COMPOSITE_2D)(INT rw, INT *enableCC_C, INT *enableCC_AB, INT *enableTLC39, INT *enableUpcMode, INT *enableBeepMode, INT *enableEmulationMode);                       
typedef INT (CALLBACK *SYMBOLOGIES_2D)(INT rw, INT *enablePDF417, INT *enableMicroPDF417, INT *enableCode128Emulation, INT *enableDataMatrix, INT *enableMaxiCode, INT *enableQRCode);                                       
typedef INT (CALLBACK *MACROPDF_2D)(INT rw, INT *modeTransmitDecode, INT *transmitControlHeader, INT *enableEscapeChar);
typedef INT (CALLBACK *MISCELLANEOUSOPTION_2D)(INT rw, INT *transmitCodeIdChar, INT *sendNoReadMessage);
typedef INT (CALLBACK *IMAGEOPTIONS_2D)(INT rw, INT *enable, INT *enableWaitCursor, INT *decodingAutoExposure, INT *decodingIllumination, INT *decodeAimingPattern, INT *imageFocus, INT *ledIllumination, INT *imageAutoExposure, INT *imageIllumination, INT *gain, INT *exposureTime, INT *snapshotModeTimeout, INT *snapshotAimPattern, INT *imageResolution, INT *jpgImageOptions, INT *qualityValue, INT *jpgSizeValue, INT *imageFileFormat, INT *bitsPerPixel);
typedef INT (CALLBACK *USERPREFERENCES_2D)(INT rw, INT *laserOnTime, INT *timeoutBetweenSameBarcode, INT *triggerMode);
typedef INT (CALLBACK *SYMBOLOGYSECURITYLEVEL_2D)(INT rw, INT *decodeRedundancy, INT *securityLevel, INT *interCharGapSize);

//================= 2D SE4507 engine ========================================================================
typedef INT (CALLBACK *UPC_2D_4507)(INT rw, INT *enableUpcA, INT *enableUpcE, INT *enableUpcE1, INT *enableAddons, INT *addonsRedundancy, INT *transmitUpcACheckDigit, INT *transmitUpcECheckDigit, INT *transmitUpcE1CheckDigit, INT *preambleUpcA, INT *preambleUpcE, INT *preambleUpcE1, INT *convertUpcEToA, INT *convertUpcE1ToA, INT *uccCouponExtendedCode);
typedef INT (CALLBACK *EANJAN_2D_4507)(INT rw, INT *enableEanJan8, INT *enableEanJan13, INT *enableBooklandEan, INT *enableAddons, INT *addonsRedundancy, INT *enableEanJan8Extended, INT *uccCouponExtendedCode);
typedef INT (CALLBACK *CODE39_2D_4507)(INT rw, INT *enable, INT *enableTrioptic, INT *convertToCode32, INT *prefixCode32, INT *checkDigitVerification, INT *transmitCheckDigit, INT *fullASCII, INT *length1, INT *length2);
typedef INT (CALLBACK *CODE128_2D_4507)(INT rw, INT *enable, INT *enableGS1_128, INT *enableISBT128, INT *enableIsbtConcatenation, INT *isbtConcatenationRedundancy);
typedef INT (CALLBACK *CODE93_2D_4507)(INT rw, INT *enable, INT *length1, INT *length2);
typedef INT (CALLBACK *CODE11_2D_4507)(INT rw, INT *enable, INT *numberOfCheckDigits, INT *transmitCheckDigit, INT *length1, INT *length2);
typedef INT (CALLBACK *INTERLEAVED2OF5_2D_4507)(INT rw, INT *enable, INT *length1, INT *length2, INT *checkDigitVerification, INT *transmitCheckDigit, INT *convertToEan13);                       
typedef INT (CALLBACK *INDUSTRIAL2OF5_2D_4507)(INT rw, INT *enable, INT *length1, INT *length2);
typedef INT (CALLBACK *CODABAR_2D_4507)(INT rw, INT *enable, INT *length1, INT *length2, INT *enableCLSIEditing, INT *enableNOTISEditing);
typedef INT (CALLBACK *MSI_2D_4507)(INT rw, INT *enable, INT *length1, INT *length2, INT *checkDigitVerification, INT *transmitCheckDigit, INT *checkDigitAlgorithm);                           
typedef INT (CALLBACK *POSTALCODE_2D_4507)(INT rw, INT *enableUSPostnet, INT *enableUSPlanet, INT *enableUKPostal, INT *transmitUKCheckDigit, INT *enableJapanPostal, INT *enableAustralianPostal, INT *enableDutchPostal, INT *transmitUSCheckDigit);
typedef INT (CALLBACK *GS1_DATABAR_2D_4507)(INT rw, INT *enableDataBarOmndirectional, INT *enableGS1_DataBarLimited, INT *transmitGS1_DataBarExpanded, INT *convertToUpcEan);
typedef INT (CALLBACK *COMPOSITE_2D_4507)(INT rw, INT *enableCC_C, INT *enableCC_AB, INT *enableTLC39, INT *enableUpcMode, INT *enableBeepMode, INT *enableEmulationMode);                       
typedef INT (CALLBACK *SYMBOLOGIES_2D_4507)(INT rw, INT *enablePDF417, INT *enableMicroPDF417, INT *enableCode128Emulation, INT *enableDataMatrix, INT *enableDataMatrixInverse, INT *decodeMirrorImage, INT *enableMaxiCode, INT *enableQRCode, INT *enableQRCodeInverse, INT *enableMicroQR, INT *enableAztec, INT *enableAztecInverse);
typedef INT (CALLBACK *MATRIX2OF5_2D_4507)(INT rw, INT *enable, INT *length1, INT *length2, INT *redundancy, INT *checkDigitVerification, INT *transmitCheckDigit);
typedef INT (CALLBACK *CHINESE2OF5_2D_4507)(INT rw, INT *enable);
typedef INT (CALLBACK *MACROPDF_2D_4507)(INT rw, INT *modeTransmitDecode, INT *transmitControlHeader, INT *enableEscapeChar);
typedef INT (CALLBACK *MISCELLANEOUSOPTION_2D_4507)(INT rw, INT *transmitCodeIdChar, INT *sendNoReadMessage);
typedef INT (CALLBACK *IMAGEOPTIONS_2D_4507)(INT rw, INT *enable, INT *enableWaitCursor, INT *decodingAutoExposure, INT *decodingIllumination, INT *decodeAimingPattern, INT *ledIllumination, INT *imageAutoExposure, INT *imageIllumination, INT *gain, INT *exposureTime, INT *snapshotModeTimeout, INT *snapshotAimPattern, INT *imageResolution, INT *jpgImageOptions, INT *qualityValue, INT *jpgSizeValue, INT *imageFileFormat, INT *bitsPerPixel);
typedef INT (CALLBACK *USERPREFERENCES_2D_4507)(INT rw, INT *laserOnTime, INT *timeoutBetweenSameBarcode, INT *triggerMode);
typedef INT (CALLBACK *SYMBOLOGYSECURITYLEVEL_2D_4507)(INT rw, INT *redundancyLevel, INT *securityLevel, INT *interCharGapSize);


//================= 1D long range and extra long range  ========================================================================
typedef INT (CALLBACK *USERPREFERENCES_1DLR)(INT rw, INT *laserOnTime, INT *scanAngle, INT *timeoutBetweenSameBarcode, INT *redundancyLevel, INT *bidirectionalRedundancy, INT *aimDuration, INT *triggerMode);
typedef INT (CALLBACK *UPC_1DLR)(INT rw, INT *enableUpcA, INT *enableUpcE, INT *enableUpcE1, INT *enableAddons, INT *addonsRedundancy, INT *transmitUpcACheckDigit, INT *transmitUpcECheckDigit, INT *transmitUpcE1CheckDigit, INT *preambleUpcA, INT *preambleUpcE, INT *preambleUpcE1, INT *convertUpcEToA, INT *convertUpcE1ToA, INT *uccCouponExtendedCode, INT *upcEanSecurityLevel);
typedef INT (CALLBACK *EANJAN_1DLR)(INT rw, INT *enableEanJan8, INT *enableEanJan13, INT *enableBooklandEan, INT *enableAddons, INT *addonsRedundancy, INT *enableEanJan8Extended, INT *uccCouponExtendedCode, INT *upcEanSecurityLevel);
typedef INT (CALLBACK *CODE39_1DLR)(INT rw, INT *enable, INT *enableTrioptic, INT *convertToCode32, INT *prefixCode32, INT *checkDigitVerification, INT *transmitCheckDigit, INT *fullASCII, INT *length1, INT *length2);
typedef INT (CALLBACK *CODE93_1DLR)(INT rw, INT *enable, INT *length1, INT *length2);                                   
typedef INT (CALLBACK *INTERLEAVED2OF5_1DLR)(INT rw, INT *enable, INT *length1, INT *length2, INT *checkDigitVerification, INT *transmitCheckDigit, INT *convertToEan13);
typedef INT (CALLBACK *INDUSTRIAL2OF5_1DLR)(INT rw, INT *enable, INT *length1, INT *length2);                                        
typedef INT (CALLBACK *CODABAR_1DLR)(INT rw, INT *enable, INT *length1, INT *length2, INT *enableCLSIEditing, INT *enableNOTISEditing);
typedef INT (CALLBACK *MSI_1DLR)(INT rw, INT *enable, INT *length1, INT *length2, INT *checkDigitVerification, INT *transmitCheckDigit, INT *checkDigitAlgorithm);                                
typedef INT (CALLBACK *RSS_1DLR)(INT rw, INT *enableRss14, INT *enableRssLimited, INT *enableRssExpanded, INT *convertToUpcEan);                                
typedef INT (CALLBACK *CODE128_1DLR)(INT rw, INT *enable, INT *enableUccEan128, INT *enableISBT128);
typedef INT (CALLBACK *MISCELLANEOUSOPTION_1DLR)(INT rw, INT *transmitCodeIdChar, INT *sendNoReadMessage);

//================= 1D, SE955  ========================================================================
typedef INT (CALLBACK *USERPREFERENCES_1D_SE955)(INT rw, INT *laserOnTime, INT *scanAngle, INT *timeoutBetweenSameBarcode, INT *redundancyLevel, INT *bidirectionalRedundancy, INT *aimDuration, INT *triggerMode);
typedef INT (CALLBACK *UPC_1D_SE955)(INT rw, INT *enableUpcA, INT *enableUpcE, INT *enableUpcE1, INT *enableAddons, INT *addonsRedundancy, INT *transmitUpcACheckDigit, INT *transmitUpcECheckDigit, INT *transmitUpcE1CheckDigit, INT *preambleUpcA, INT *preambleUpcE, INT *preambleUpcE1, INT *convertUpcEToA, INT *convertUpcE1ToA, INT *uccCouponExtendedCode, INT *upcEanSecurityLevel);
typedef INT (CALLBACK *EANJAN_1D_SE955)(INT rw, INT *enableEanJan8, INT *enableEanJan13, INT *enableBooklandEan, INT *enableAddons, INT *addonsRedundancy, INT *enableEanJan8Extended, INT *uccCouponExtendedCode, INT *upcEanSecurityLevel);
typedef INT (CALLBACK *CODE39_1D_SE955)(INT rw, INT *enable, INT *enableTrioptic, INT *convertToCode32, INT *prefixCode32, INT *checkDigitVerification, INT *transmitCheckDigit, INT *fullASCII, INT *length1, INT *length2);
typedef INT (CALLBACK *CODE93_1D_SE955)(INT rw, INT *enable, INT *length1, INT *length2);                                   
typedef INT (CALLBACK *INTERLEAVED2OF5_1D_SE955)(INT rw, INT *enable, INT *length1, INT *length2, INT *checkDigitVerification, INT *transmitCheckDigit, INT *convertToEan13);
typedef INT (CALLBACK *INDUSTRIAL2OF5_1D_SE955)(INT rw, INT *enable, INT *length1, INT *length2);                                        
typedef INT (CALLBACK *CODABAR_1D_SE955)(INT rw, INT *enable, INT *length1, INT *length2, INT *enableCLSIEditing, INT *enableNOTISEditing);
typedef INT (CALLBACK *MSI_1D_SE955)(INT rw, INT *enable, INT *length1, INT *length2, INT *checkDigitVerification, INT *transmitCheckDigit, INT *checkDigitAlgorithm);                                
typedef INT (CALLBACK *GS1_DATABAR_1D_SE955)(INT rw, INT *enableDataBarOmndirectional, INT *enableGS1_DataBarLimited, INT *transmitGS1_DataBarExpanded, INT *convertToUpcEan);
typedef INT (CALLBACK *CODE128_1D_SE955)(INT rw, INT *enable, INT *enableGS1_128, INT *enableISBT128);
typedef INT (CALLBACK *MISCELLANEOUSOPTION_1D_SE955)(INT rw, INT *transmitCodeIdChar, INT *sendNoReadMessage);
typedef INT (CALLBACK *CHINESE2OF5_1D_SE955)(INT rw, INT *enable);
typedef INT (CALLBACK *CODE11_1D_SE955)(INT rw, INT *enable, INT *numberOfCheckDigits, INT *transmitCheckDigit, INT *length1, INT *length2);

//================= Others  ========================================================================
typedef INT (CALLBACK *NOTIFICATIONSETTINGS)(INT rw, INT *goodRead, INT *enableVibrator, INT *vibrationTime, INT *ledDuration, INT *buzzerDuration, INT *buzzerFreq);                    
typedef INT (CALLBACK *DATAOUTPUTSETTINGS)(INT rw, INT *enableKeyboardEmulation, INT *autoEnterWay, INT *autoEnterChar, INT *showCodeType, INT *showCodeLen, CHAR *prefixCode, INT prefixCodeLen, CHAR *suffixCode, INT suffixCodeLen);
typedef INT (CALLBACK *RFIDSETTINGS)(INT rw, INT *readUid, INT *readUserData, INT *userDataStartByte, INT *readUserDataLen, INT *useDelim, INT *timeout, CHAR *mifareLoginKey, INT loginKeyLength, INT *loginKeyType);
      