Page 1
.NET Programming For 9400 Series Mobile Computers DOC Version 1.03...
Page 2
Due to continued product development this information may change without notice. The information and intellectual property contained herein is confidential between CIPHERLAB and the client and remains the exclusive property of CIPHERLAB CO., LTD. If you find any problems in the documentation, please report them to us in writing.
Page 3
RELEASE NOTES Version Date Notes Modified: 2.1.1 Initialization — InitReader(), add error code 1.03 Oct. 26, 2009 E_NO_READER_INSTALLED Modified: 2.1.2 Active Device — GetActiveDevice(), SetActiveDevice() Modified: 2.6.14 Rss_1D — “enableRss14AndExpanded” Modified: 3.13 Button Assignment — “6” for Backspace Modified: 2.5.2 Reader DLL Version — add GetNETDLLVersion 1.02 Aug.
CipherLab 9400 .NET Programming Guide provides necessary information on dealing with the reader configuration, the retrieval of decoded data, as well as the system configuration of 9400 Series Mobile Computers, in the application development process. Using the .NET Framework, it is easy to write applications to control the reader and retrieve the data decoded, as well as hardware resources.
9400 .NET Programming Guide DEVELOPMENT TOOL It is assumed that the programmer has prior knowledge of Windows programming. For information on Windows application programming interface (API), essential online resource is available on Microsoft website – http://msdn2.microsoft.com/en-us/library/default.aspx For the 9400 mobile computer is running on Windows CE 5.0, the development environment and tools can be one of the following choices: Visual Studio 2008 Visual Studio 2005...
Chapter 1 CREATING APPLICATIONS We provide the two DLL files Reader_Ce_Net.DLL and SystemApi_Ce_Net.DLL. Find the necessary file on the CD-ROM before you start to write your application. IN THIS CHAPTER 1.1 Create a C# Application ..........3 1.2 Create a Visual Basic Application ........9 1.1 CREATE A VISUAL C# APPLICATION Follow these steps to create a Visual C# application in Visual Studio 2008.
Page 12
9400 .NET Programming Guide 2) Select the Smart Device project type and the Smart Device Project template. 3) Select Windows CE for the target platform and Device Application for the template to use.
Page 13
Chapter 1 Creating Applications 4) Copy the DLL file to the project folder. SystemApi_Ce_Net.DLL Reader_Ce_Net.DLL 5) Right-click References and select Add Reference.
Page 14
9400 .NET Programming Guide 6) Click on the Browse tab and locate the DLL file. Select the file and click OK.
Page 15
Chapter 1 Creating Applications 7) You should include “using Cipherlab.SystemAPI” to use the System DLL file.
Page 16
9400 .NET Programming Guide 8) Start to write your code…...
Chapter 1 Creating Applications 1.2 CREATE A VISUAL BASIC APPLICATION Follow these steps to create a Visual Basic application in Visual Studio 2005. Refer to Appendix II Sample Code. 1) On the File menu, point to New, and then click Project.
Page 18
9400 .NET Programming Guide 2) Select the Smart Device project type and the Device Application template.
Page 19
Chapter 1 Creating Applications 3) Copy the DLL file to the project folder. SystemApi_Ce_Net.DLL Reader_Ce_Net.DLL...
Page 20
9400 .NET Programming Guide 4) Right-click Device Application1 and select Add Reference.
Page 21
Chapter 1 Creating Applications 5) Click on the Browse tab and locate the DLL file. Select the file and click OK.
Page 22
9400 .NET Programming Guide 6) You should include “using Cipherlab.SystemAPI” to use the System DLL file.
Page 23
Chapter 1 Creating Applications 7) Start to write your code…...
Chapter 2 READER API Find Reader_Ce_Net.DLL on the CD-ROM before you start to write your application. IN THIS CHAPTER 2.1 Initialize/Identify Reader..........18 2.2 Obtain Data .............. 22 2.3 Obtain Image ............40 2.4 Manipulate Status Indication ........46 2.5 Obtain Essential Information ........50 2.6 Configure Scan Engine —...
9400 .NET Programming Guide 2.1 INITIALIZE/IDENTIFY READER 2.1.1 INITIALIZATION InitReader Purpose To initialize the reader (or readers, depending on hardware configuration). Syntax int InitReader (); Example for C# int b1 = 0; b1 = Reader.ReaderEngineAPI.InitReader(); Example for VB Reader.ReaderEngineAPI.InitReader() Return Value If successful, it returns 1.
Chapter 2 Reader API 2.1.2 ACTIVE DEVICE GetActiveDevice Purpose To find out the reader type currently active in use. Syntax int GetActiveDevice (); Example for C# int dev = 0; dev = Reader.ReaderEngineAPI.GetActiveDevice(); Example for VB Dim dev As Integer Dev = Reader.ReaderEngineAPI.GetActiveDevice() Return Value If successful, it returns the reader type(s) accordingly:...
Page 28
9400 .NET Programming Guide SetActiveDevice Purpose To set the reader type ready for use. Syntax int SetActiveDevice (int target); Parameters target [in] A value that defines the active device. NO_ACTIVE_DEVICE Disable all active devices. DC_READER_BC Only barcode reader active. (= RFID reader is inactive!) DC_READER_RFID Only RFID...
Chapter 2 Reader API 2.1.3 READER TYPE GetReaderType Purpose To find out the reader type in hardware. Syntax int GetReaderType (); Example for C# int type = 0; type = Reader.ReaderEngineAPI.GetReaderType(); Example for VB Dim type As Integer type = Reader.ReaderEngineAPI.GetReaderType() Return Value If successful, it returns the reader type(s) accordingly: ID_MOD_1D...
9400 .NET Programming Guide 2.2 OBTAIN DATA 2.2.1 DATA OUTPUT SETTINGS Processed Data Use DataOutputSettings() to configure how to process data for a barcode. The barcode data can be processed to include [Code Type], [Code Length], [Prefix Code], and [Suffix Code]. Barcode Data Length (Byte) Description...
Page 31
Chapter 2 Reader API Note: The fields of data can be as follows – [Tag Type][Tag Length][Tag UID][Delimiter][Tag Data] Raw Data Use the following functions to obtain raw data — GetDecodeData() and GetDecodeType() for barcode data. GetImageContent() and GetImageSize()for 2D image. GetDecodeRfidData(), GetDecodeRfidUID() and GetDecodeTagType() for RFID data.
Page 32
9400 .NET Programming Guide DataOutputSettings Purpose To configure data output settings. The decoded data may be processed with code/tag type, data length, prefix code, suffix code, etc. Syntax int DataOutputSettings (int rw, ref int enableKeyboardEmulation, ref int autoEnterWay, ref int autoEnterChar, ref int showCodeType, ref int showCodeLen, ref string prefixCode,...
Page 33
Chapter 2 Reader API showCodeType [in][out] A value that defines whether to insert barcode type or RFID tag type in data records… DO NOT transmit code type Transmit code type showCodeLen [in][out] A value that defines whether to insert length code for barcode or RFID tag in data records…...
Page 34
9400 .NET Programming Guide [Tag Length]: This field is output only when the value of sShowCodeLen is non-zero. When specified to read UID only, it refers to the length of UID. It covers the prefix/suffix code if any has been specified. [Tag UID]: This field is output only when the value of readUID of RfidSettings() is non-zero.
Chapter 2 Reader API 2.2.2 RFID SETTINGS RfidSettings Purpose To configure data output settings. The decoded data may be processed with code/tag type, data length, prefix code, suffix code, etc. Syntax int RfidSettings (int rw, ref int readUid, ref int readUserData, ref int userDataStartByte, ref int readUserDataLen, ref int useDelim,...
Page 36
9400 .NET Programming Guide timeout [in][out] A value that defines the elapsed time before a scanning session* ends. 3* (second) mifareLoginKey [in] Ignore this parameter for the RFID reader is ID_MOD_TI_RFID. Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: -253 E_WRONG_READER_TYPE...
Chapter 2 Reader API 2.2.3 BARCODE DATA Use GetDecodeData() and GetDecodeType() to obtain raw data of a barcode. GetDecodeData Purpose To get the decoded data of a barcode upon pressing the trigger. Syntax int GetDecodeData (ref string buf); Parameters [in][out] Pointer to a buffer where the decoded data is stored. Example for C# int b1 = 0;...
Page 38
9400 .NET Programming Guide GetDecodeType Purpose To obtain the code type of the decoded barcode upon pressing the trigger. Syntax int GetDecodeType (); Example for C# int codeType = 0; codeType = Reader.ReaderEngineAPI.GetDecodeType(); Example for VB Dim codeType As Integer codeType = Reader.ReaderEngineAPI.GetDecodeType() Return Value If successful, it returns the code type.
Page 40
9400 .NET Programming Guide ReadBarcodeData Purpose To read data from the barcode without intercepting WM_DECODEDATA. Syntax int ReadBarcodeData (ref int codeType, ref string outBuf, int timeout); Parameters codeType [in][out] Pointer to a variable that stores the barcode type. outBuf [in][out] Pointer to a buffer where the data is stored. timeout [in] The elapsing time before the read operation is stopped, in the range of 1~60 in units of second.
Chapter 2 Reader API 2.2.4 RFID DATA Use GetDecodeRfidData(), GetDecodeRfidUID() and GetDecodeTagType() to obtain raw data of an RFID tag. Some RFID tags support both read/write operations, on a page-by-page basis. You may find it necessary to define your own read/write operation. If so, use ReadRfidData() and WriteRfidData() to read and write to the tag.
Page 42
9400 .NET Programming Guide GetDecodeRfidData Purpose To get the decoded data of an RFID tag upon pressing the trigger. Syntax int GetDecodeRfidData (ref string buf); Parameters [in][out] Pointer to a buffer where the decoded data is stored. Example for C# int b1 = 0;...
Page 43
Chapter 2 Reader API GetDecodeTagType Purpose To obtain the tag type of the decoded RFID tag upon pressing the trigger. Syntax int GetDecodeTagType (); Example for C# int tagType = 0; tagType = Reader.ReaderEngineAPI.GetDecodeTagType(); Example for VB Dim tagType As Integer tagType = Reader.ReaderEngineAPI.GetDecodeTagType() Return Value If successful, it returns the tag type.
Page 44
9400 .NET Programming Guide ReadRfidData Purpose To read data from the RFID tag without intercepting WM_DECODEDATA. Syntax int ReadRfidData (int nType, ref string szReadData, int nStartByte, int nReadLen, int nTimeout, string loginKey); Parameters nType [in] A value that defines which part of RFID data is to be read. READ_UID Read UID only.
Page 45
Chapter 2 Reader API Example for C# int b1 = 0; string szRead = string.Empty; string loginKey = string.Empty; b1 = Reader.ReaderEngineAPI.ReadRfidData( Reader.ReaderEngineAPI.READ_DATA, ref szRead, -1, 10, 10, loginKey); Example for VB Dim szRead As String = "" Dim loginKey As String = "" Reader.ReaderEngineAPI.ReadRfidData( Reader.ReaderEngineAPI.READ_DATA, szRead, -1, 10, 10, loginKey) Return Value...
Page 46
9400 .NET Programming Guide WriteRfidData Purpose To write data to the RFID tag upon pressing the trigger. Syntax int WriteRfidData (string szWriteData, int nStartByte, int nWriteLen, int nWritten, int nTimeout, int nMode, string loginKey); Parameters szWriteData [in] A string variable that stores the data. nStartByte [in] A value that defines the start byte or start page (for a specific tag type).
Page 47
Chapter 2 Reader API loginKey [in] Ignore this parameter for the RFID reader is ID_MOD_TI_RFID. Example for C# int b1 = 0; string data = "22222222222222"; string loginKey = string.Empty; b1 = Reader.ReaderEngineAPI.WriteRfidData( data, -1, data.Length, 0, 10, 0, loginKey); Example for VB Dim data As String = "22222222222222"...
9400 .NET Programming Guide 2.3 OBTAIN IMAGE 2.3.1 IMAGE OUTPUT SETTINGS ImageOptions_2D Purpose To configure 2D scan engine for image output. Syntax int ImageOptions_2D (int rw, ref int enable, ref int enableWaitCursor, ref int decodingAutoexposure, ref int decodingIllumination, ref int decodeAimingPattern, ref int focusMode, ref int ledIllumination, ref int imageAutoexposure,...
Page 49
Chapter 2 Reader API enableWaitCursor [in][out] A value that defines whether to enable the wait cursor while processing an image. Disable Wait Cursor Enable Wait Cursor decodingAutoexposure [in][out] A value that defines whether to allow 2D scan engine to control gain settings and exposure time to best capture a 2D barcode.
Page 50
9400 .NET Programming Guide imageIllumination [in][out] A value that defines whether to flash illumination on every image capture to aid decoding. Disable Image Capture Illumination Enable Image Capture Illumination gain [in][out] A value that defines gain when Decoding Autoexposure or Image Autoexposure is disabled.
Page 51
Chapter 2 Reader API jpgImageOptions [in][out] A value that defines whether to optimize JPEG images for either size or quality. Optimized for JPEG size Optimized for JPEG quality qualityValue [in][out] A value that defines the image quality. Set a value from 5 to 100, where “100”...
9400 .NET Programming Guide 2.3.2 IMAGE DATA Use GetImageContent() and GetImageSize() to obtain raw data of a 2D image. These functions are only available on a device with 2D scan engine when the image capture feature is enabled. GetImageContent Purpose To obtain the contents of a captured image upon pressing the trigger.
Page 53
Chapter 2 Reader API ReadImage Purpose To capture an image without intercepting WM_DECODEIMAGE. Syntax int ReadImage (ref ArrayList buf, ref int capturedImgSize); Parameters pbuf [in][out] An ArrayList variable that stores the image contents. capturedImgSize [in][out] An integer variable that stores the size of a captured image. Example for C# int b1 = 0;...
9400 .NET Programming Guide 2.4 MANIPULATE STATUS INDICATION According to the settings of NotificationSettings(), the ReaderDLL will automatically signal whether a successful decoding is obtained by playing a sound or turning on/off the vibrator. Call Beeper() and SetVibrator()to signal for receiving other events except decoding.
Page 55
Chapter 2 Reader API ledDuration [in][out] A value that defines whether to enable Good Read LED (green). Disable 1~255 (millisecond) buzzerDuration [in][out] A value that defines whether to beep for a successful reading. Disable 1~255 (0.1 second) buzzerFreq [in][out] A value that specify the buzzer frequency (+ 500 Hz per increment) when it beeps to indicate a successful reading.
9400 .NET Programming Guide 2.4.2 BEEPER Beeper Purpose To play a sound. Syntax int Beeper (int nMode, string szPath); Parameters nMode [in] A value that defines the sound to be played. Mute Sound 1 ~ Sound 9 User-defined path szPath [in] A string varialbe that stores the user-defined path.
Chapter 2 Reader API 2.4.3 VIBRATOR SetVibrator Purpose To put the vibrator into action. Syntax int SetVibrator (int nMode, int nDuration); Parameters nMode [in] A value that defines the vibrator status. Turn off the vibrator Non-zero Turn on the vibrator nDuration [in] A value that defines the elapsed time before the vibrator stops, in the range of 0~60 in units of second,...
9400 .NET Programming Guide 2.5 OBTAIN ESSENTIAL INFORMATION 2.5.1 SERIAL NUMBER GetSerialNumber Purpose To obtain the serial number of the mobile computer. Syntax int GetSerialNumber (ref string buf); Parameters [in][out] Pointer to a buffer where the serial number is stored. Example for C# int b1 = 0;...
Chapter 2 Reader API 2.5.2 READER DLL VERSION GetDllVer Purpose To obtain the current C/C++ library version for Reader DLL. Syntax int GetDllVer (ref string buf); Parameters [in][out] Pointer to a buffer where the version number is stored. Example for C# int b1 = 0;...
9400 .NET Programming Guide 2.5.3 ERROR INFORMATION GetErrorCode Purpose To find the current error condition encountered. Syntax int GetErrorCode (); Example for C# int b1 = 0; int errCode = 0; b1 = Reader.ReaderEngineAPI.InitReader(); if(b1 == 0) errCode = GetErrorCode(); Example for VB Dim errCode As Integer If Reader.ReaderEngineAPI.InitReader() = 0 Then...
Chapter 2 Reader API 2.6 CONFIGURE SCAN ENGINE — 1D: CCD/LASER SCAN ENGINE UserPreferences_1D() is provided for configuring reader settings. The rest functions are provided for changing symbology settings. CCD: CCD scan engine Laser: Laser scan engine 2.6.1 PREFERENCES UserPreferences_1D CCD, Laser Purpose To configure reader settings.
Page 62
9400 .NET Programming Guide timeout [in][out] A value that defines the elapsed time before a scanning session ends. This setting only applies to these scan modes: Aiming mode, Laser mode, Auto Off mode, and Auto Power Off mode. 0~255 3* (second) Return Value If successful, it returns 1.
Chapter 2 Reader API 2.6.2 CODABAR_1D CodaBar_1D CCD, Laser Purpose To configure symbology settings — Codabar. Syntax int CodaBar_1D (int rw, ref int enable, ref int startStopChar, ref int transmitStartStopChar); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
9400 .NET Programming Guide 2.6.3 INDUSTRIAL25_1D Industrial25_1D CCD, Laser Purpose To configure symbology settings — Industrial 25. Syntax int Industrial25_1D (int rw, ref int enable, ref int checkDigitVerification, ref int transmitCheckDigit, ref int startStopPattern, ref int isMaxMinLengthFormat, ref int length1, ref int length2);...
Page 65
Chapter 2 Reader API isMaxMinLengthFormat [in][out] A value that defines whether to use the Max/Mix length format. Fixed length format Max/Min length format length1 [in][out] A value that defines the maximum length or the 1 fixed length. 0~127 127* length2 [in][out] A value that defines the minimum length or the 2 fixed length.
9400 .NET Programming Guide 2.6.4 INTERLEAVED25_1D Interleaved25_1D CCD, Laser Purpose To configure symbology settings — Interleaved 25. Syntax int Interleaved25_1D (int rw, ref int enable, ref int checkDigitVerification, ref int transmitCheckDigit, ref int startStopPattern, ref int isMaxMinLengthFormat, ref int length1, ref int length2);...
Page 67
Chapter 2 Reader API isMaxMinLengthFormat [in][out] A value that defines whether to use the Max/Mix length format. Fixed length format Max/Min length format length1 [in][out] A value that defines the maximum length or the 1 fixed length. 0~127 127* length2 [in][out] A value that defines the minimum length or the 2 fixed length.
9400 .NET Programming Guide 2.6.5 MATRIX25_1D Matrix25_1D CCD, Laser Purpose To configure symbology settings — Matrix 25. Syntax int Matrix25_1D (int rw, ref int enable, ref int checkDigitVerification, ref int transmitCheckDigit, ref int startStopPattern, ref int isMaxMinLengthFormat, ref int length1, ref int length2);...
Page 69
Chapter 2 Reader API isMaxMinLengthFormat [in][out] A value that defines whether to use the Max/Mix length format. Fixed length format Max/Min length format length1 [in][out] A value that defines the maximum length or the 1 fixed length. 0~127 127* length2 [in][out] A value that defines the minimum length or the 2 fixed length.
9400 .NET Programming Guide 2.6.6 CODE39_1D Code39_1D CCD, Laser Purpose To configure symbology settings — Code 39. Syntax int Code39_1D (int rw, ref int enable, ref int checkDigitVerification, ref int transmitCheckDigit, ref int fullASCII, ref int transmitStartStopChar); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 71
Chapter 2 Reader API Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: -253 E_WRONG_READER_TYPE...
9400 .NET Programming Guide 2.6.7 CODE93_1D Code93_1D CCD, Laser Purpose To configure symbology settings — Code 93. Syntax int Code93_1D (int rw, ref int enable); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Chapter 2 Reader API 2.6.8 CODE128_1D Code128_1D CCD, Laser Purpose To configure symbology settings — Code 128. Syntax int Code128_1D (int rw, ref int enable); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
9400 .NET Programming Guide 2.6.9 EAN128_1D Ean128_1D CCD, Laser Purpose To configure symbology settings — GS1-128 (EAN-128). Syntax int Ean128_1D (int rw, ref int enable, ref int wantCodeID, ref int ean128FieldSeparator); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Chapter 2 Reader API 2.6.10 PHARMACODE_1D Pharmacode_1D CCD, Laser Purpose To configure symbology settings — Italian and French Pharmacode. Syntax int Pharmacode_1D (int rw, ref int enableItalianPharmacode, ref int enableFrenchPharmacode, ref int transmitCheckDigitItalian, ref int transmitCheckDigitFrench); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
9400 .NET Programming Guide 2.6.11 MSI_1D Msi_1D CCD, Laser Purpose To configure symbology settings — MSI. Syntax int Msi_1D (int rw, ref int enable, ref int checkDigitVerification, ref int transmitCheckDigit, ref int isMaxMinLengthFormat, ref int length1, ref int length2); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”.
Page 77
Chapter 2 Reader API length1 [in][out] A value that defines the maximum length or the 1 fixed length. 0~127 127* length2 [in][out] A value that defines the minimum length or the 2 fixed length. 0~127 4* Return Value If successful, it returns 1. Otherwise, it returns 0.
9400 .NET Programming Guide 2.6.12 NEGATIVBARCODE_1D NegativeBarcode_1D CCD, Laser Purpose To configure negative barcode settings. Syntax int NegativeBarcode_1D (int rw, ref int enable); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation. ‘r’...
Chapter 2 Reader API 2.6.13 PLESSEY_1D Plessey_1D CCD, Laser Purpose To configure symbology settings — Plessey. Syntax int Plessey_1D (int rw, ref int enable, ref int transmitCheckDigit, ref int convertToUKPlessey); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
9400 .NET Programming Guide 2.6.14 RSS_1D Rss_1D CCD, Laser Purpose To configure symbology settings — GS1 DataBar (RSS family). Syntax int Rss_1D (int rw, ref int enableRssLimited, ref int enableRss14AndExpanded, ref int transmitRss14CodeID, ref int transmitRss14ApplicationID, ref int transmitRss14CheckDigit, ref int transmitRssLimitedCodeID, ref int transmitRssLimitedApplicationID, ref int transmitRssLimitedCheckDigit, ref int transmitRssExpandedCodeID);...
Page 81
Chapter 2 Reader API transmitRss14CheckDigit [in][out] A value that defines whether to include the check digit in the RSS-14 data being transmitted. Do not transmit Transmit transmitRssLimitedCodeID [in][out] A value that defines whether to include RSS Limited Code ID “]e0” in the data being transmitted.
9400 .NET Programming Guide 2.6.15 TELEPEN_1D Telepen_1D CCD, Laser Purpose To configure symbology settings — Telepen. Syntax int Telepen_1D (int rw, ref int enable, ref int enableAIM); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Chapter 2 Reader API 2.6.16 EAN8_1D Ean8_1D CCD, Laser Purpose To configure symbology settings — EAN-8. Syntax int Ean8_1D (int rw, ref int enable, ref int enableAddon2, ref int enableAddon5, ref int transmitCheckDigit, ref int convertToEAN13); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 84
9400 .NET Programming Guide Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: -253 E_WRONG_READER_TYPE...
Chapter 2 Reader API 2.6.17 EAN13UPCA_1D Ean13UpcA_1D CCD, Laser Purpose To configure symbology settings — EAN-13 and UPC-A. Syntax int Ean13UpcA_1D (int rw, ref int enable, ref int enableAddon2, ref int enableAddon5, ref int convertToISBN, ref int convertToISSN, ref int transmitEan13CheckDigit, ref int convertToEAN13, ref int transmitUpcACheckDigit, ref int transmitUpcASystemNumber);...
Page 86
9400 .NET Programming Guide convertToISSN [in][out] A value that defines whether to convert EAN-13 to ISSN. Do not convert Convert transmitEan13CheckDigit [in][out] A value that defines whether to include the check digit in the EAN-13 data being transmitted. Do not transmit Transmit convertToEAN13 [in][out] A value that defines whether to convert UPC-A to EAN-13.
Chapter 2 Reader API 2.6.18 GTIN_1D Gtin_1D CCD, Laser Purpose To configure GTIN settings. Syntax int Gtin_1D (int rw, ref int enable); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation. ‘r’...
9400 .NET Programming Guide 2.6.19 UPCE_1D UpcE_1D CCD, Laser Purpose To configure symbology settings — UPC-E. Syntax int UpcE_1D (int rw, ref int enable, ref int enableAddon2, ref int enableAddon5, ref int enableUpcE1, ref int convertToUpcA, ref int transmitCheckDigit, ref int transmitSystemNumber, ref int enableUpcE1TripleCheck);...
Page 89
Chapter 2 Reader API convertToUpcA [in][out] A value that defines whether to convert UPC-E to UPC-A. Do not convert Convert transmitCheckDigit [in][out] A value that defines whether to include the check digit in the data being transmitted. Do not transmit Transmit transmitSystemNumber [in][out] A value that defines whether to include the system number in the...
9400 .NET Programming Guide 2.7 CONFIGURE SCAN ENGINE — 2D SCAN ENGINE UserPreferences_2D() and MiscellaneousOption_2D are provided for configuring reader settings. The rest functions are provided for changing symbology settings. 2.7.1 PREFERENCES UserPreferences_2D Purpose To configure reader settings. Syntax int UserPreferences_2D (int rw, ref int laserOnTime, ref int timeoutBetweenSameBarcode, ref int triggerMode);...
Page 91
Chapter 2 Reader API Host Triggering signal comes from a host command. Any actual trigger pull will be interpreted by the scan engine as a “Level” triggering option. Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: -253 E_WRONG_READER_TYPE...
Page 92
9400 .NET Programming Guide SymbologySecurityLevel_2D Purpose To configure decode redundancy settings. Syntax int SymbologySecurityLevel _2D (int rw, ref int decodeRedundancy, ref int securityLevel, ref int interCharGapSize); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 93
Chapter 2 Reader API Security Level 0 – This default setting allows the scan engine to operate in its most aggressive state, providing sufficient security in decoding most “in-spec” barcodes. Security Level 1 – Select this option if misdecodes occur. This level should eliminate most misdecodes.
Page 94
9400 .NET Programming Guide MiscellaneousOption_2D Purpose To configure more reader settings. Syntax int MiscellaneousOption _2D (int rw, ref int transmitCodeIdChar, ref int sendNoReadMessage); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation. ‘r’...
Page 95
Chapter 2 Reader API AIM Code ID — Code Characters Code Character Code Type Code 39, Code 39 Full ASCII, Code 32 Code 128, Coupon (Code 128 portion) Data Matrix UPC/EAN, Coupon (UPC portion) GS1 DataBar (RSS) Codabar Code 93 Code 11 Interleaved 25 PDF417, Macro PDF417, Micro PDF417...
Page 96
9400 .NET Programming Guide Modulo 10 check digit verified but not transmitted. Industrial 25 Always transmit 0. (Discrete 25) UPC/EAN Standard data packet in full EAN country code format, which is 13 digits for UPC-A and UPC-E (not including supplemental data). Standard data packet...
Page 97
Chapter 2 Reader API Channel Interpretation). All data characters 92DEC are doubled. Scan engine is set for Basic Channel operation (no escape character transmission protocol). Data characters 92DEC are not doubled. When decoders are set to this mode, unbuffered Macro symbols and symbols requiring the decoder to convey ECI escape sequences cannot be transmitted.
9400 .NET Programming Guide 2.7.2 UPC_2D Upc_2D Purpose To configure symbology settings — UPC-A and UPC-E. Syntax int Upc_2D (int rw, ref int enableUpcA, ref int enableUpcE, ref int enableUpcE1, ref int enableAddons, ref int addonsRedundancy, ref int transmitUpcACheckDigit, ref int transmitUpcECheckDigit, ref int transmitUpcE1CheckDigit, ref int preambleUpcA, ref int preambleUpcE,...
Page 99
Chapter 2 Reader API enableAddons [in][out] A value that defines whether to enable UPC/EAN/JAN Addon 2 and Addon 5. Ignore Addons Decode only with Addons Decode with Addons (= Auto-discriminate) addonsRedundancy [in][out] A value that defines the decode redundancy when “Decode with Addons (= Auto-discriminate)”...
Page 100
9400 .NET Programming Guide convertUpcEtoA [in][out] A value that defines whether to convert UPC-E0 to UPC-A. Do not convert Convert convertUpcE1toA [in][out] A value that defines whether to convert UPC-E1 to UPC-A. Do not convert Convert uccCouponExtendedCode [in][out] A value that defines whether to enable UCC Coupon Code: UPC-A barcodes starting with digit "5"...
Chapter 2 Reader API 2.7.3 EANJAN_2D EanJan_2D Purpose To configure symbology settings — EAN/JAN-8 and EAN/JAN-13. Syntax int EanJan_2D (int rw, ref int enableEanJan8, ref int enableEanJan13, ref int enableBooklandEan, ref int enableAddons, ref int addonsRedundancy, ref int enableEanJan8Extended, ref int uccCouponExtendedCode ref int linearDecode);...
Page 102
9400 .NET Programming Guide addonsRedundancy [in][out] A value that defines the decode redundancy when “Decode with Addons (= Auto-discriminate)” is applied. 2~30 10* (times of supplementary decoding) enableEanJan8Extended [in][out] A value that defines whether to convert EAN/JAN-8 to EAN/JAN-13. Do not convert Convert uccCouponExtendedCode [in][out] A value that defines whether to enable UCC Coupon Code: EAN-13...
Chapter 2 Reader API 2.7.4 CODE39_2D Code39_2D Purpose To configure symbology settings — Code 39. Syntax int Code39_2D (int rw, ref int enable, ref int enableTrioptic, ref int convertToCode32, ref int prefixCode32, ref int checkDigitVerification, ref int transmitCheckDigit, ref int fullASCII, ref int length1, ref int length2);...
Page 104
9400 .NET Programming Guide checkDigitVerification [in][out] A value that defines whether to perform check digit verification when decoding barcodes. Do not verify Verify transmitCheckDigit [in][out] A value that defines whether to include the check digit in the data being transmitted. Do not transmit Transmit fullASCII...
Chapter 2 Reader API 2.7.5 CODE93_2D Code93_2D Purpose To configure symbology settings — Code 93. Syntax int Code93_2D (int rw, ref int enable, ref int length1, ref int length2); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
9400 .NET Programming Guide 2.7.6 INTERLEAVED2OF5_2D Interleaved2of5_2D Purpose To configure symbology settings — Interleaved 25. Syntax int Interleaved2of5_2D (int rw, ref int enable, ref int length1, ref int length2, ref int checkDigitVerification, ref int transmitCheckDigit, ref int convertToEAN13); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 107
Chapter 2 Reader API convertToEAN13 [in][out] A value that defines whether to convert Interleaved 25 to EAN-13. Check digit verification must be disabled first! This only works when the barcode has a leading zero and a valid EAN-13 check digit. Do not convert Convert Return Value...
9400 .NET Programming Guide 2.7.7 DISCRETE2OF5_2D Discrete2of5_2D Purpose To configure symbology settings — Discrete 25 (= Industrial 25). Syntax int Discrete2of5_2D (int rw, ref int enable, ref int length1, ref int length2); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Chapter 2 Reader API 2.7.8 CODABAR_2D Codabar_2D Purpose To configure symbology settings — Codabar. Syntax int Codabar_2D (int rw, ref int enable, ref int length1, ref int length2, ref int enableCLSI_Editing, ref int enableNOTIS_Editing); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 110
9400 .NET Programming Guide Disable Enable NOTIS Editing is to strip the start/stop characters, which equals to “Disable Transmit Start/Stop Characters". Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: -253 E_WRONG_READER_TYPE...
Chapter 2 Reader API 2.7.9 MSI_2D Msi_2D Purpose To configure symbology settings — MSI. Syntax int Msi_2D (int rw, ref int enable, ref int length1, ref int length2, ref int checkDigitVerification, ref int transmitCheckDigit, ref int checkDigitAlgorithm); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 112
9400 .NET Programming Guide checkDigitAlgorithm [in][out] A value that defines which algorithm to apply. Modulo 10 / Modulo 11 Double Modulo 10 Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: -253 E_WRONG_READER_TYPE...
Chapter 2 Reader API 2.7.10 RSS_2D Rss_2D Purpose To configure symbology settings — GS1 DataBar (= RSS family). Syntax int Rss_2D (int rw, ref int enableRss14, ref int enableRssLimited, ref int enableRssExpanded, ref int convertToUpcEan); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
9400 .NET Programming Guide 2.7.11 CODE128_2D Code128_2D Purpose To configure symbology settings — Code 128. Syntax int Code128_2D (int rw, ref int enableCode128, ref int enableUccEan128, ref int enableISBT128); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Chapter 2 Reader API 2.7.12 CODE11_2D Code11_2D Purpose To configure symbology settings — Code 11. Syntax int Code11_2D (int rw, ref int enable, ref int numberOfCheckDigits, ref int transmitCheckDigit, ref int length1, ref int length2); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 116
9400 .NET Programming Guide Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: -253 E_WRONG_READER_TYPE...
Chapter 2 Reader API 2.7.13 POSTALCODE_2D PostalCode_2D Purpose To configure symbology settings — Postal Codes. Syntax int PostalCode_2D (int rw, ref int enableUSPostnet, ref int enableUSPlanet, ref int enableUKPostal, ref int transmitUKCheckDigit, ref int enableJapanPostal, ref int enableAustralianPostal, ref int enableDutchPostal, ref int transmitUSCheckDigit);...
Page 118
9400 .NET Programming Guide enableJapanPostal [in][out] A value that defines whether to enable Japan Postal. Disable Enable enableAustralianPostal [in][out] A value that defines whether to enable Australian Postal. Disable Enable enableDutchPostal [in][out] A value that defines whether to enable Dutch Postal. Disable Enable transmitUSCheckDigit...
Chapter 2 Reader API 2.7.14 COMPOSITE_2D Composite_2D Purpose To configure symbology settings — Composite barcodes. Syntax int Composite_2D (int rw, ref int enableCC_C, ref int enableCC_AB, ref int enableTLC39, ref int enableUpcMode, ref int enableBeepMode, ref int enableEmulationMode); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 120
9400 .NET Programming Guide enableBeepMode [in][out] A value that defines whether to enable Composite Beep Mode. One or more beeps are given to indicate a composite barcode is decoded. Single Beep after both are decoded Beep as each code type is decoded Double Beep after both are decoded enableEmulationModel [in][out] A value that defines whether to enable GS1-128 Emulation Mode for...
Chapter 2 Reader API 2.7.15 SYMBOLOGIES_2D Symbologies_2D Purpose To configure 2D symbology settings. Syntax int Symbologies_2D (int rw, ref int enablePDF417, ref int enableMicroPDF417, ref int enableCode128Emulation, ref int enableDataMatrix, ref int enableMaxicode, ref int enableQRCode); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 122
9400 .NET Programming Guide The first codeword of MicroPDF417 is 910 or 911: The original Code ID "]L5" will be changed to "]C0". enableDataMatrix [in][out] A value that defines whether to enable Data Matrix. Disable Enable enableMaxicode [in][out] A value that defines whether to enable Maxicode. Disable Enable enableQRCode...
Chapter 2 Reader API 2.7.16 MACROPDF_2D MacroPDF_2D Purpose To configure symbology settings — Macro PDF. Syntax int MacroPDF_2D (int rw, ref int modeTransmitDecode, ref int transmitControlHeader, ref int enableEscCharacter); Parameters The default value (if there is) for each setting is indicated by an asterisk “*”. [in] A value that defines the operation.
Page 124
9400 .NET Programming Guide enableEscCharacter [in][out] A value that defines whether to enable the backslash "\" as an Escape character for systems that can process transmissions containing special data sequences. It will format special data according to the Global Label Identifier (GLI) protocol, which only affects the data portion of a Macro PDF symbol transmission.
Chapter 2 Reader API 2.8 RESET READER ResetReaderToDefault Purpose To reset the barcode reader. Syntax int ResetReaderToDefault (int target); Parameters target [in] A value that defines the reader type. DC_READER_BC Reset the barcode reader only. DC_READER_RFID Reset the RFID reader only. ALL_DEVICE Reset both readers.
Chapter 3 SYSTEM API Find SystemApi_Ce_Net.DLL on the CD-ROM before you start to write your application. IN THIS CHAPTER 3.1 System Settings ............120 3.2 Backlight ..............124 3.3 Touch Panel .............132 3.4 Taskbar ..............135 3.5 Keypad..............136 3.6 Trigger ..............146 3.7 Audio ..............148 3.8 Vibrator..............151 3.9 Wireless LAN ............152 3.10 Bluetooth...............158...
APIVer [in][out] Pointer to a buffer where the API version information is stored. Example for C# int b1 = 0; string apiver = string.Empty; b1 = Cipherlab.SystemAPI.Member.GetAPIVersion(ref apiver); Example for VB Dim apiver AS String = "" Cipherlab.SystemAPI.Member.GetAPIVersion(apiver) Return Value If successful, it returns 1.
[in][out] Pointer to a buffer where the device name is stored. Example for C# int b1 = 0; string devname = string.Empty; b1 = Cipherlab.SystemAPI.Member.GetSysDevName(ref devname); Example for VB Dim devname As String = "" Cipherlab.SystemAPI.Member.GetSysDevName(devname) Return Value If successful, it returns 1.
SysInfo structure that stores the system information. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.SysInfo sysinfo = new Cipherlab.SystemAPI.Member.SysInfo(); b1 = Cipherlab.SystemAPI.Member.GetSysInfo(ref sysinfo); Example for VB Dim sysinfo As New Member.SysInfo Cipherlab.SystemAPI.Member.GetSysInfo(sysinfo) Return Value If successful, it returns 1. Otherwise, it returns 0.
Purpose To perform software reset (warm boot). Syntax int SystemSoftReset (); Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SystemSoftReset(); Example for VB Cipherlab.SystemAPI.Member.SystemSoftReset() Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
BklCtl structure that stores the settings. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.BklCtl bkctl = new Cipherlab.SystemAPI.Member.BklCtl(); b1 = Cipherlab.SystemAPI.Member.GetBacklightCTL(ref bkctl); Example for VB Dim bkctl As New Member.BklCtl Cipherlab.SystemAPI.Member.GetBacklightCTL(bkctl) Return Value If successful, it returns 1. Otherwise, it returns 0.
Page 133
SetBacklightCTL (BklCtl bklctl); Parameters bklctl [in] BklCtl structure that stores the settings. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.BklCtl bklctl = new Cipherlab.SystemAPI.Member.BklCtl(); bklctl.batttimeout = 60; bklctl.actimeout = 60; bklctl.backlightontap = 0; bklctl.lightlevel = 3; bklctl.acbacklightontap = 1; bklctl.aclightlevel = 6;...
[in][out] A byte variable that stores the information. Example for C# int b1 = 0; byte aclevel = new byte(); b1 = Cipherlab.SystemAPI.Member.GetBacklightLV(1, ref aclevel); Example for VB Dim aclevel As New Byte Cipherlab.SystemAPI.Member.GetBacklightLV(1, aclevel) Return Value If successful, it returns 1.
Page 135
Backlight level for AC mode byLevel [in] Byte variable – Level 0 (dark) to Level 6 (bright) Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetBacklightLV(1, 6); Example for VB Cipherlab.SystemAPI.Member.SetBacklightLV(1, 6) Return Value If successful, it returns 1.
[in][out] A byte variable that stores the information. Backlight OFF Backlight ON Example for C# int b1 = 0; byte bstate = new byte(); b1 = Cipherlab.SystemAPI.Member.GetBacklightST(ref bstate); Example for VB Dim bstate As New Byte Cipherlab.SystemAPI.Member.GetBacklightST(bstate) Return Value If successful, it returns 1.
ERROR_NORESOURCE (Failed to get resource) Out of range, backlight level in battery mode. Out of range, backlight level in AC mode. Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetBacklightDefault(); Example for VB Cipherlab.SystemAPI.Member.SetBacklightDefault() Remarks System defaults are –...
Purpose To set backlight control for maximum performance. Syntax int SetBacklightMax (); Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetBacklightMax(); Example for VB Cipherlab.SystemAPI.Member.SetBacklightMax() Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: ERROR_NORESOURCE (Failed to get resource) Out of range, backlight level in battery mode.
Purpose To set backlight control for minimum performance. Syntax int SetBacklightMin (); Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetBacklightMin(); Example for VB Cipherlab.SystemAPI.Member.SetBacklightMin() Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: ERROR_NORESOURCE (Failed to get resource) Out of range, backlight level in battery mode.
[in][out] A byte variable that stores the information. Touch panel unlocked Touch panel locked Example for C# int b1 = 0; byte bLock = new byte(); b1 = Cipherlab.SystemAPI.Member.GetTchLock(ref bLock); Example for VB Dim bLock As New Byte Cipherlab.SystemAPI.Member.GetTchLock(bLock) Return Value If successful, it returns 1.
Page 141
[in] Byte variable Touch panel unlocked Touch panel locked Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetTchLock(0); Example for VB Cipherlab.SystemAPI.Member.SetTchLock(0) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
QVGA for 320 x 240 pixels VGA for 640 x 480 pixels Example for C# int b1 = 0; byte paneltype = new byte(); b1 = Cipherlab.SystemAPI.Member.GetDisplayType(ref paneltype); Example for VB Dim paneltype As New Byte Cipherlab.SystemAPI.Member.GetDisplayType(paneltype) Return Value If successful, it returns 1.
[in] Byte variable Taskbar always visible Taskbar always hide (invisible) Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetTaskBarAlwaysHide(0); Example for VB Cipherlab.SystemAPI.Member.SetTaskBarAlwaysHide(0) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
[in][out] A byte variable that stores the information. 28-key layout 59-key layout Example for C# int b1 = 0; byte keypadtype = new byte(); b1 = Cipherlab.SystemAPI.Member.GetKeypadType(ref keypadtype); Example for VB Dim keypadtype As New Byte Cipherlab.SystemAPI.Member.GetKeypadType(keypadtype) Return Value If successful, it returns 1.
KeyPadLock structure that stores the information. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.Member.KeyPadLock keylock = new Cipherlab.SystemAPI.Member.Member.KeyPadLock(); b1 = Cipherlab.SystemAPI.Member.GetKeyPadKeyLock(ref keylock); Example for VB Dim keylock As New Member.KeyPadLock Cipherlab.SystemAPI.Member.GetKeyPadKeyLock(keylock) Return Value If successful, it returns 1. Otherwise, it returns 0.
Full keypad unlocked Full keypad locked (=disabled) Example for C# int b1 = 0; byte flock = new byte(); b1 = Cipherlab.SystemAPI.Member.GetKeyPadFullKeyState(ref flock); Example for VB Dim flock As New Byte Cipherlab.SystemAPI.Member.GetKeyPadFullKeyState(flock) Return Value If successful, it returns 1. Otherwise, it returns 0.
Page 147
[in] Byte variable Full keypad unlocked Full keypad locked (=disabled) Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetKeyPadFullKeyLock(0); Example for VB Cipherlab.SystemAPI.Member.SetKeyPadFullKeyLock(0) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
Input mode allows upper-case alphabets and other yellow-coded (or orange-coded) characters on the keypad Example for C# int b1 = 0; byte bstate = new byte(); b1 = Cipherlab.SystemAPI.Member.GetKeyAlphaState(ref bstate); Example for VB Dim bstate As New Byte Cipherlab.SystemAPI.Member.GetKeyAlphaState(bstate) Return Value If successful, it returns 1.
Page 149
[in] Byte variable Alpha Key unlocked Alpha Key locked (=disabled) Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetKeyPadAlphaKeyLock(0); Example for VB Cipherlab.SystemAPI.Member.SetKeyPadAlphaKeyLock(0) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
[in][out] A byte variable that stores the information. Function mode disabled Function mode enabled Example for C# int b1 = 0; byte funstate = new byte(); b1 = Cipherlab.SystemAPI.Member.GetKeyFuncKeyState(ref funstate); Example for VB Dim funstate As New Byte Cipherlab.SystemAPI.Member.GetKeyFuncKeyState(funstate) Return Value If successful, it returns 1.
Page 151
(=enabled) Function mode can be toggled by [FN] key only Example for C# int b1 = 0; byte flock = new byte(); b1 = Cipherlab.SystemAPI.Member.GetKeyPadFuncKeyLock(ref flock); Example for VB Dim flock As New Byte Cipherlab.SystemAPI.Member.GetKeyPadFuncKeyLock(flock) Return Value If successful, it returns 1.
Page 152
Function (FN) key unlocked… (=enabled) Function mode can be toggled by the [FN] key only Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetKeyPadFuncKeyLock(0); Example for VB Cipherlab.SystemAPI.Member.SetKeyPadFuncKeyLock(0) Return Value If successful, it returns 1. Otherwise, it returns 0.
[in][out] An unsigned integer variable that stores the information. Example for C# int b1 = 0; uint value = new uint(); b1 = Cipherlab.SystemAPI.Member.GetKeyPadSensitivity(ref value); Example for VB Dim value As new UInteger Cipherlab.SystemAPI.Member.GetKeyPadSensitivity(value) Return Value If successful, it returns 1.
Trigger key unlocked (System default) Trigger key locked Example for C# int b1 = 0; byte triggerState = new byte(); b1 = Cipherlab.SystemAPI.Member.GetTriggerState(ref triggerState); Example for VB Dim triggerState As New Byte Cipherlab.SystemAPI.Member.GetTriggerState(triggerState) Return Value If successful, it returns 1.
Page 155
Purpose To unlock the trigger key. Syntax int SetTriggerLockOFF (); Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetTriggerLockOFF(); Example for VB Cipherlab.SystemAPI.Member.SetTriggerLockOFF() Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
[in][out] An unsigned integer variable that stores the information. Example for C# int b1 = 0; uint volume = new uint(); b1 = Cipherlab.SystemAPI.Member.GetAudioVolume(ref volume); Example for VB Dim volume As New UInteger Cipherlab.SystemAPI.Member.GetAudioVolume(volume) Return Value If successful, it returns 1.
Page 157
The volume level of the left channel is specified in the low-order word. The volume level of the right channel is specified in the high-order word. Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetAudioVolume(0xffff5555); Example for VB Cipherlab.SystemAPI.Member.SetAudioVolume(65535) Return Value If successful, it returns 1.
Page 158
Purpose To set the speaker “unmuted”. Syntax int SetAudioMuteOFF (); Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetAudioMuteOFF(); Example for VB Cipherlab.SystemAPI.Member.SetAudioMuteOFF() Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
[in][out] A byte variable that stores the information. Vibrator OFF Vibrator ON Example for C# int b1 = 0; byte bState = new byte(); b1 = Cipherlab.SystemAPI.Member.GetVibratorPower(ref bState); Example for VB Dim bState As New Byte Cipherlab.SystemAPI.Member.GetVibratorPower(bState) Return Value If successful, it returns 1.
Turn off the power to the Wi-Fi module Turn on the power to the Wi-Fi module Example for C# int b1 = 0; byte poweron = new byte(); b1 = Cipherlab.SystemAPI.Member.GetWiFiPower(ref poweron); Example for VB Dim poweron As New Byte Cipherlab.SystemAPI.Member.GetWiFiPower(poweron) Return Value If successful, it returns 1.
WlanAdptInfo structure that stores the information. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.WlanAdptInfo wlanAdptInfo = new Cipherlab.SystemAPI.Member.WlanAdptInfo(); b1 = Cipherlab.SystemAPI.Member.GetWlanIpInfo(ref wlanAdptInfo); Example for VB Dim wlanAdptInfo As New Member.WlanAdptInfo Cipherlab.SystemAPI.Member.GetWlanIpInfo(wlanAdptInfo) Return Value If successful, it returns 1. Otherwise, it returns 0.
Page 162
SetWlanIpInfo (WlanAdptInfo wlanAdptInfo); Parameters wlanAdptInfo [in] WlanAdptInfo structure that stores the information. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.WlanAdptInfo setwlinfo = new Cipherlab.SystemAPI.Member.WlanAdptInfo(); setwlinfo.fUseDHCP = 0; setwlinfo.IPAddr = "192.168.6.153"; setwlinfo.SubnetMask = "255.255.255.0"; setwlinfo.Gateway = "192.168.6.253"; b1 = Cipherlab.SystemAPI.Member.SetWlanIpInfo(setwlinfo); Example for VB Dim setwlinfo As New Member.WlanAdptInfo...
AddWlanSsidToPreferredList (WlanCtl wlanCtl); Parameters wlanCtl [in] WlanCtl structure that stores the information. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.WlanCtl wlanCtl = new Cipherlab.SystemAPI.Member.WlanCtl(); wlanCtl.SSID = "Netgear"; wlanCtl.authentication = 0; wlanCtl.encryption = 1; wlanCtl.adhoc = 0; wlanCtl.eap = 0; wlanCtl.key = "";...
Page 164
To clear the list of preferred wireless networks (via access points). Syntax int ResetWlanPreferredList (); Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.ResetWlanPreferredList(); Example for VB Cipherlab.SystemAPI.Member.ResetWlanPreferredList() Return Value If successful, it returns 1. Otherwise, it returns 0.
GetWlanConnectedStatus (ref WlanConnectedSt wlanConnSt); Parameters wlanConnSt [in][out] WlanConnectedSt structure that stores the information. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.WlanConnectedSt wlanConnSt = new Cipherlab.SystemAPI.Member.WlanConnectedSt(); b1 = Cipherlab.SystemAPI.Member.GetWlanConnectedStatus(ref wlanConnSt); Example for VB Dim wlanConnSt As New Member.WlanConnectedSt Cipherlab.SystemAPI.Member.GetWlanConnectedStatus(wlanConnSt) Return Value If successful, it returns 1.
Purpose To initialize the Bluetooth module. Syntax int StartBluetooth (); Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.StartBluetooth(); Example for VB Cipherlab.SystemAPI.Member.StartBluetooth() Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
[in][out] An integer variable that stores the device information. Example for C# int b1 = 0; int devInfo = 0; b1 = Cipherlab.SystemAPI.Member.FindNextBTDevice(ref devInfo); Example for VB Dim devInfo As Integer Cipherlab.SystemAPI.Member.FindNextBTDevice(devInfo) Return Value If successful, it returns 1.
Page 168
[in] A string variable that stores the PIN code. Example for C# int b1 = 0; string pinCode = “1234”; b1 = Cipherlab.SystemAPI.Member.StartPairing(devInfo, pinCode); Example for VB Dim devInfo As Integer Dim pinCode As String = “1234” Cipherlab.SystemAPI.Member. StartPairing(devInfo, pinCode) Return Value If successful, it returns 1.
[in] A value returned by FindNextBTDevice(). serviceInfo [in][out] An integer variable that stores the information. Example for C# int b1 = 0; int serviceInfo = 0; b1 = Cipherlab.SystemAPI.Member.FindService( 3, devInfo, ref serviceInfo); Example for VB Dim serviceInfo As Integer Cipherlab.SystemAPI.Member.FindService(3, devInfo, serviceInfo) Return Value If successful, it returns 1.
Page 170
[in] A value returned by FindNextBTDevice(). devAddr [in][out] An integer variable that stores the MAC address. Example for C# int b1 = 0; int devAddr = 0; b1 = Cipherlab.SystemAPI.Member.GetDeviceAddress( devInfo, ref devAddr); Example for VB Dim devAddr As Integer Cipherlab.SystemAPI.Member.GetDeviceAddress(devInfo, devAddr) Return Value If successful, it returns 1.
Page 171
[in][out] Pointer to a buffer where the device name is stored. Example for C# int b1 = 0; string devName = string.Empty; b1 = Cipherlab.SystemAPI.Member.GetDeviceName(devInfo, ref devName); Example for VB Dim devName As String Cipherlab.SystemAPI.Member.GetDeviceName(devInfo, devName) Return Value If successful, it returns 1.
Page 172
[in] A value returned by FindService(). serviceType [in][out] An integer variable that stores the information. Example for C# int b1 = 0; int serviceInfo = 0; b1 = Cipherlab.SystemAPI.Member.GetServiceType( serviceInfo, ref serviceType); Example for VB Dim serviceType As Integer Cipherlab.SystemAPI.Member.GetServiceType(serviceInfo, serviceType) Return Value If successful, it returns 1.
Disconnect with the target Bluetooth device Connect with the target Bluetooth device Example for C# int b1 = 0; int status = 0; b1 = Cipherlab.SystemAPI.Member.GetBTConnStatus( serviceInfo, ref connStatus); Example for VB Dim connStatus As Integer Cipherlab.SystemAPI.Member.GetBTConnStatus(serviceInfo, connStatus) Return Value If successful, it returns 1.
Page 174
[in] A value returned by FindNextBTDevice(). serviceInfo [in] A value returned by FindService(). Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetBTConnStatus( 1, 1, deviceInfo, serviceInfo); Example for VB Cipherlab.SystemAPI.Member.SetBTConnStatus( 1, 1, deviceInfo, serviceInfo) Return Value If successful, it returns 1.
Page 175
Chapter 3 System API ERROR_WRONG_SERVICE_TYPE ERROR_DEVICE_NOT_HAS_SERVICE ERROR_OPERATION_FAIL See Also FindNextBTDevice, FindService...
[in] A value returned by FindService(). targetPath [in] A string variable that stores the directory path information. Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.StartBrowse(serviceInfo, “\\”); Example for VB Cipherlab.SystemAPI.Member.StartBrowse(serviceInfo, “\”) Return Value If successful, it returns 1.
Page 177
Ftp_File_Info structure that stores the information. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.Ftp_File_Info fileInfo = new Cipherlab.SystemAPI.Member.Ftp_File_Info(); b1 = Cipherlab.SystemAPI.Member.GetNextFile(serviceInfo, fileInfo); Example for VB Dim fileInfo As Member.Ftp_File_Info Cipherlab.SystemAPI.Member.GetNextFile(serviceInfo, fileInfo) Return Value If successful, it returns 1. Otherwise, it returns 0.
[in][out] Ftp_File_Info structure that stores the information. Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.GetFile(serviceInfo, fileInfo); Example for VB Cipherlab.SystemAPI.Member.GetFile(serviceInfo, fileInfo) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
Page 179
[in] A string variable that stores the file path information. Example for C# int b1 = 0; string filePath = “\\DiskOnChip\\Test.txt”; b1 = Cipherlab.SystemAPI.Member.PutFile(serviceInfo, filePath); Example for VB Dim filePath As String = “\DiskOnChip\Test.txt” Cipherlab.SystemAPI.Member.PutFile(serviceInfo, filePath) Return Value If successful, it returns 1.
Power to GPRS card is OFF Power to GPRS card is ON Example for C# int b1 = 0; byte gPoweron = new byte(); b1 = Cipherlab.SystemAPI.Member.GetGPRSPower(ref gPoweron); Example for VB Dim gPoweron As New Byte Cipherlab.SystemAPI.Member.GetGPRSPower(gPoweron) Return Value If successful, it returns 1.
[in][out] An integer variable that stores the information. GPRS network disconnected GPRS network connected Example for C# int b1 = 0; int status = 0; b1 = Cipherlab.SystemAPI.Member.GetGPRSConnStatus(ref connStatus); Example for VB Dim connStatus As Integer Cipherlab.SystemAPI.Member.GetGPRSConnStatus(connStatus) Return Value If successful, it returns 1.
Page 182
[in] A string variable that stores the domain name. If passing NULL or “”, it uses “” as a default value. Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetGPRSConnStatus(1, “GPRS”, “”, “”, “”, “”, “”, “”); Example for VB Cipherlab.SystemAPI.Member.SetGPRSConnStatus(1, “GPRS”, “”, “”, “”,...
Page 183
Chapter 3 System API Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered: ERROR_MACHINE_NOT_SUPPORTED It may return error codes defined by Microsoft. Please refer to http://msdn.microsoft.com/en-us/library/bb530704(VS.85).aspx. Remarks Please make sure the GPRS power is turned on before calling this function. See Also SetGPRSPower...
It succeeds in obtaining the PIN code. Example for C# int b1 = 0; byte result = 0; string pin = string.Empty; b1 = Cipherlab.SystemAPI.Member.GetPINCode(ref pin, ref result); Example for VB Dim result As Byte = 0 Dim pin As String = “” Cipherlab.SystemAPI.Member.GetPINCode(pin, result) Return Value If successful, it returns 1.
Page 185
Example for C# int b1 = 0; byte result = 0; string pin = string.Empty; pin = “1234”; b1 = Cipherlab.SystemAPI.Member.SetPINCode(pin, ref result); Example for VB Dim result As Byte = 0 Dim pin As String = “1234” Cipherlab.SystemAPI.Member.SetPINCode(pin, result) Return Value If successful, it returns 1.
Purpose To turn off the buzzer. Syntax int SetBuzzerOFF (); Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetBuzzerOFF(); Example for VB Cipherlab.SystemAPI.Member.SetBuzzerOFF() Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
[in] Integer variable Turn off status light Turn on status light Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetLEDLight(0x01, 1); Example for VB Cipherlab.SystemAPI.Member.SetLEDLight(1, 1) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
[in][out] Pointer to a buffer where the full file path of the program is stored. Example for C# int b1 = 0; int ikeyCode = 0; string sprogram = string.Empty; b1 = Cipherlab.SystemAPI.Member.GetButtonAssignment( 1, ref ikeyCode, ref sprogram); Example for VB Dim ikeyCode As Integer Dim sprogram As String = ""...
Page 189
Chapter 3 System API SetButtonAssignment Purpose To assign a user-definable key to act as another key or serve as a shortcut key for launching a specific program. Syntax int SetButtonAssignment (int buttonID, int keyCode, string program); Parameters buttonID [in] Integer variable Side-Trigger-Left-Up (default: Enter) Side-Trigger-Left-Down...
Page 190
OEM_Key8 (0xF0) OEM_Key9 (0xF1) program [in] A string variable that stores the full file path of the program. Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.SetButtonAssignment( 1, 1, "\\DiskOnChip\\CE_ReaderConfig.exe"); Example for VB Cipherlab.SystemAPI.Member.SetButtonAssignment( 1, 1, "\DiskOnChip\CE_ReaderConfig.exe") Return Value If successful, it returns 1.
[in] Integer variable Disable (Turn off the camera.) Enable (Turn on the camera.) Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.EnableCamera(1); Example for VB Cipherlab.SystemAPI.Member.EnableCamera(1) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
CamState structure that stores the preview settings. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.CamState camInfo = new Cipherlab.SystemAPI.Member.CamState(); b1 = Cipherlab.SystemAPI.Member.GetPreviewState(ref camInfo); Example for VB Dim camInfo As New Member.CamState Cipherlab.SystemAPI.Member.GetPreviewState(camInfo) Return Value If successful, it returns 1. Otherwise, it returns 0.
Page 193
Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.CamState camInfo = new Cipherlab.SystemAPI.Member.CamState(); camInfo.PosX = 20; camInfo.PosY = 85; b1 = Cipherlab.SystemAPI.Member.SetPreviewState(ref camInfo); Example for VB Dim camInfo As New Member.CamState camInfo.PosX = 20 camInfo.PosY = 85 Cipherlab.SystemAPI.Member.SetPreviewState(camInfo) Return Value If successful, it returns 1.
PicState structure that stores the capture settings. Example for C# int b1 = 0; Cipherlab.SystemAPI.Member.PicState picInfo = new Cipherlab.SystemAPI.Member.PicState(); b1 = Cipherlab.SystemAPI.Member.GetStillCaptureState(ref picInfo); Example for VB Dim picInfo As New Member.PicState Cipherlab.SystemAPI.Member.GetStillCaptureState(picInfo) Return Value If successful, it returns 1. Otherwise, it returns 0.
Page 195
= 1; picinfo.ImageFormat = 0; picinfo.lpPathName = "\\DiskOnChip"; picinfo.PathSize = 260; picinfo.lpFileName = "Test001"; picinfo.FileSize = 260; b1 = Cipherlab.SystemAPI.Member.SetStillCaptureState(ref picinfo); Example for VB Dim picinfo As New Member.PicState picinfo.ResX = 800 picinfo.ResY = 600 picinfo.FlashLight = 1 picinfo.ImageFormat = 0 picinfo.lpPathName = "\DiskOnChip"...
Page 196
Example for C# int b1 = 0; byte[] captureBuffer = new byte[1600 * 1200 * 2 + 2048 + 0x1000]; b1 = Cipherlab.SystemAPI.Member.StartStillCapture(captureBuffer, 1); Example for VB Dim captureBuffer(1600 * 1200 * 2 + 2048 + 4095) As Byte Cipherlab.SystemAPI.Member.StartStillCapture(captureBuffer, 1) Return Value If successful, it returns 1.
No wired headset is found. A wired headset is present. Example for C# int b1 = 0; byte headsetState = new byte(); b1 = Cipherlab.SystemAPI.Member.GetHeadsetState(ref headsetState); Example for VB Dim headsetState As New Byte Cipherlab.SystemAPI.Member.GetHeadsetState(headsetState) Return Value If successful, it returns 1.
[in] Integer variable Disable voice input via microphone. Enable voice input via microphone. Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.EnableGsmAudioIn(1); Example for VB Cipherlab.SystemAPI.Member.EnableGsmAudioIn(1) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
[in] Integer variable Disable Bluetooth audio Enable Bluetooth audio Example for C# int b1 = 0; b1 = Cipherlab.SystemAPI.Member.EnableBTAudio(1); Example for VB Cipherlab.SystemAPI.Member.EnableBTAudio(1) Return Value If successful, it returns 1. Otherwise, it returns 0. Call GetErrorCode() to find the error condition encountered:...
= 0; int errCode = 0; b1 = Cipherlab.SystemAPI.Member.SystemSoftReset(); if(b1 == 0) errCode = GetErrorCode(); Example for VB Dim errCode As Integer If Cipherlab.SystemAPI.Member.SystemSoftReset() = 0 Then errCode = Member.GetErrorCode() End If Return Value If successful, it returns the error code.
Chapter 4 DATA STRUCTURE IN THIS CHAPTER 4.1 System Information Structure ........193 4.2 Backlight Structure ...........195 4.3 Keypad Structures ............197 4.4 Wi-Fi Structures ............199 4.5 Bluetooth Structure...........203 4.6 Camera Structures ............204 4.1 SYSTEM INFORMATION STRUCTURE 4.1.1 SysInfo This structure stores the system information, which is identical to the settings displayed on the mobile computer via Start | Settings | Control Panel | System –...
Page 202
9400 .NET Programming Guide string ManuDate Manufacturer Date – the manufacturing date. string OsVer OS Version string DevDesc Device Model of the mobile computer. string Manufactory Manufacturer...
Chapter 4 Data Structure 4.2 BACKLIGHT STRUCTURE 4.2.1 BklCtl This structure stores information about the backlight control, which is identical to the settings displayed on the mobile computer via Start | Settings | Control Panel | Display - Backlight tab. Battery mode - Battery power in use AC mode - The mobile computer is connected to an AC power source via the cradle.
Page 204
9400 .NET Programming Guide screen or press a key – Disable backlight on tap in battery mode Enable backlight on tap in battery mode uint acbacklightontap When backlight is off in AC mode, it will be automatically turned on when you tap the touch screen or press a key –...
Chapter 4 Data Structure 4.3 KEYPAD STRUCTURES 4.3.1 KeyPadLock This structure stores information about the lock state of keypad. public struct KeyPadLock public int FullKey; public int TaskKey; public byte FuncKey; public int AlphaKey; Data Type Member Name Description FullKey Whether all keys on the keypad are locked –...
9400 .NET Programming Guide 4.3.2 KeyPadBind This structure stores information about the program to be executed upon system initialization. public struct KeyPadBind public string szClass; Data Type Member Name Description string szClass Name of the program that is to be executed.
Chapter 4 Data Structure 4.4 WI-FI STRUCTURES 4.4.1 WlanAdptInfo This structure stores information about wireless networking, which is identical to the settings displayed on the mobile computer via Start | Settings | Network and Dial-up Connections – double-tap WLAN1. public struct WlanAdptInfo public uint fUseDHCP;...
9400 .NET Programming Guide 4.4.2 WlanConnectedSt This structure stores information about wireless connection status, which is identical to the one displayed on the Wireless Information tab when you double-tap the WLAN1 dialog box on the taskbar. public struct WlanConnectedSt public string SSID;...
Chapter 4 Data Structure 4.4.3 WlanCtl This structure stores information about new wireless network, which is identical to the one displayed on the Wireless Information tab after you double-tap the WLAN1 dialog box on the taskbar and [Add New...] for adding new wireless network. public struct WlanCtl public string SSID;...
Page 210
9400 .NET Programming Guide PEAP string WEP key in any of the following formats – 1/0x1234567890 [index=1,40-bit(10-digit hexa)] 4/zxcvb [index=4, 40-bit(5-char)] 3/0x12345678901 [index=3, 104-bit(26-digit 234567890123456 hexa)] 2/abcdefghij123 [index=2, 104-bit(13-char)] auto [key comes from successful EAP]...
Chapter 4 Data Structure 4.5 BLUETOOTH STRUCTURE 4.5.1 Ftp_File_Info public struct Ftp_File_Info public int fileType; public string fileName; public int fileSize; Data Type Member Name Description fileType File type of the saved file. string fileName File name of the saved file. fileSize Size of the file name.
9400 .NET Programming Guide 4.6 CAMERA STRUCTURES 4.6.1 CamState public struct CamState public int PosX; public int PosY; public int FlashLight; public int AutoExposure; public int AutoWhiteBalance; public int Feature; Data Type Member Name Description PosX Position of the preview image (the X coordinate of the upper-left point) –...
Chapter 4 Data Structure 4.6.2 PicState public struct PicState public int ResX; public int ResY; public int FlashLight; public int AutoExposure; public int AutoWhiteBalance; public int ImageFormat; public string lpPathName; public int PathSize; public string lpFileName; public int FileSize; Data Type Member Name Description ResX...
Appendix I SCAN ENGINE SETTINGS The 9400 Series Mobile Computers provide flexible choices on the readers (or scan engines): 1D CCD scan engine 1D Laser scan engine 2D scan engine RFID reader — ID_MOD_TI_RFID v1.0.A Options of different reader combination are allowed, such as 1D+RFID and 2D+RFID. For each combination, both readers can be initialized and ready for scanning at the same time (dual mode operation).
9400 .NET Programming Guide SYMBOLOGIES SUPPORTED Varying by the scan engine installed, the supported symbologies or tag types are listed below. For details on configuring associated settings, please refer to each Appendix separately. CCD, Laser Codabar Code 11 Code 93 Composite Code Plessey Postal Codes...
Page 217
Appendix I Scan Engine Settings QR Code...
9400 .NET Programming Guide RFID TAGS SUPPORTED The RFID reader supports read/write operations depending on the tags. The supported labels include ISO 15693, Icode®, ISO 14443A, and ISO 14443B. Currently, the performance of some tags has been confirmed, and the results are listed below for your reference.
Appendix II SAMPLE CODE REGISTER DECODE MESSAGE First, register the WM_DECODEDATA or WM_DECODEIMAGE message. For example, decodeMsg = Win32API.RegisterWindowMessage("WM_DECODEDATA"); where decodeMsg is the message identifier to be broadcasted when a scan engine or RFID reader decodes data. decodeMsg = Win32API.RegisterWindowMessage("WM_DECODEIMAGE"); where decodeMsg is the message identifier to be broadcasted when a 2D scan engine captures an image.
Page 220
9400 .NET Programming Guide Note: ReadBarcodeData(), ReadRfidData() and ReadImage() are provided for users who want to scan and retrieve data without intercepting WM_DECODEDATA and WM_DECODEIMAGE. For example, if users want to scan data by clicking a GUI button, all they need to do is to invoke one of the three functions in the clicking event handler function.
Appendix II Sample Code VISUAL C# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.WindowsCE.Forms; using System.Runtime.InteropServices; namespace ReaderBarcodeTest public partial class Form1 : Form MsgWindow MsgWin; public Form1() InitializeComponent(); MsgWin = new MsgWindow(this); int b1 = 0;...
Page 222
9400 .NET Programming Guide public MsgWindow(Form1 msgform) this.msgform = msgform; decodeMsg = Win32API.RegisterWindowMessage("WM_DECODEDATA"); protected override void WndProc(ref Message msg) if (msg.Msg == decodeMsg) switch (msg.WParam.ToInt32()) case 7: b1 = Reader.ReaderEngineAPI.GetDecodeData(ref tmp); this.msgform.label4.Text = tmp; break; default: break; base.WndProc(ref msg); public class Win32API [DllImport("coredll.dll", SetLastError = true)] public static extern uint RegisterWindowMessage(string lpString);...
Appendix II Sample Code VISUAL BASIC Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Text Imports System.Windows.Forms Imports Microsoft.WindowsCE.Forms Imports System.Runtime.InteropServices Public Class Form1 Private MsgWin As MsgWindow Public Sub New() InitializeComponent() Me.MsgWin = New MsgWindow(Me) Reader.ReaderEngineAPI.InitReader() End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load...
Page 224
9400 .NET Programming Guide MyBase.WndProc(msg) End Sub End Class...
Need help?
Do you have a question about the 9400 Series and is the answer not in the manual?
Questions and answers