Advertisement

Quick Links

PT-61 Mobile Computer
Programming Manual
DOC NO. UM-PT605-02
July 2010
Version 1.0
© 2002-2010 by ARGOX Information Co., Ltd.
http://www.argox.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PT-61 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Argox PT-61

  • Page 1 PT-61 Mobile Computer Programming Manual DOC NO. UM-PT605-02 July 2010 Version 1.0 © 2002-2010 by ARGOX Information Co., Ltd. http://www.argox.com...
  • Page 2: Table Of Contents

    Table of Contents OVERVIEW..........................................2 SDK FUNCTIONS........................................3 SYSAPIAX.DLL........................................4 ..................................6 UDIO ELA TED UNCTIONS Audio_GetV olume................................6 Audio_SetV olume................................7 ................................8 A TTERY ELA TED UNCTION GetBatteryStatus................................8 ................................10 ISPLA Y ELA TED UNCTIONS BacklightOn..................................10 Display_QueryBacklightIntensity..........................11 GetBacklightStatus.................................13 PowerOnLCD................................14 SetBacklightPWM.................................15 ................................16 ELA TED UNCTIONS EnablePowerButton..............................16 GetKeypadAlphaMode..............................17 SendKbdVisualKey................................18 SetKeypadAlphaMode..............................19 LED R...
  • Page 3 ................................32 LUETOOTH ELA TED UNCTION BT_Enable..................................32 BT_Disable..................................33 ................................34 IRELESS ELA TED UNCTION WL_Enable..................................34 WL_Disable..................................35 SCANAPIAX.DLL......................................36 API_SCAN R ..............................38 ELA TED UNCTIONS API_Register...................................38 API_Unregister................................39 API_GetBarData................................40 API_GetBarDataLength.............................42 API_GetBarType................................43 API_GetError.................................45 API_GetSysError................................46 API_GoodRead................................47 API_LoadSettingsFromFile............................48 API_Reset..................................49 API_ResetBarData...............................50 API_SaveSettingsToFile...............................51 API_SaveSettingsToScanner............................52 S2K_IsLoad..................................53 S2K_Load..................................54 SCAN_QueryStatus..............................55 SCAN_SendCommand..............................56 SCAN_ResumeSystem..............................57 SCAN_BatchSetting..............................58 SCAN_BatchRead................................59 ...............................60 ELA TED...
  • Page 4 .................................69 ELA TED UNCTIONS EnableTriggerKey.................................69 GetLibraryV ersion.................................70 GetTriggerKeyStatus..............................71 PressTriggerKey................................72 TriggerKeyStatus................................73 SCAN COMMAND TABLE..................................74 FUNCTION RETURN V ALUES.................................82 Programming Manual...
  • Page 5: Overview

    Argox Mobile Computers running a Microsoft® Windows® .NET CE5.0 Operating System. It gives all of the details necessary for calling functions which control the devices on the Argox Mobile Computer or access the Value-added device module, such as Scanning and Wireless.
  • Page 6: Sdk Functions

    SDK Functions When user wants to use SDK to develop their own program, they should link DLL file or LIB file, and include header file SYSAPIAX.H. There are two examples to show how to use LIB file and DLL file on their project. We will use Visual Studio 2005 to explain.
  • Page 7: Sysapiax.dll

    SYSAPIAX.DLL In this SDK, we supply SYSAPIAX.DLL which includes several functions to allow programmer to control device drivers and system functions. User can use WINCE develop tool like Visual Studio 2005 to develop application program. The function description is given below. Audio Related Functions ...
  • Page 8  ShowDeskTop – Display and hide all icons on desktop.  ShowExploreToolbar – Display and hide toolbar on windows explorer.  ShowTaskbar – Display and hide taskbar.  UnregisterAlphaKeyNotification – Unregister message request. Vibrator Related Functions  VibratorOn – On and off vibration indicator. Programming Manual...
  • Page 9: Audio Related Functions

    Audio Related Functions Audio_GetV olume This function queries the current volume setting. DWORD Audio_GetV olume LPDWORD lpdwV olume Parameters lpdwV olume [out] The current volume setting. Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, the return value is E_FUNC_ERROR.
  • Page 10: Audio_Setv Olume

    Audio_SetV olume This function sets the current volume setting. DWORD Audio_SetV olume DWORD dwV olume Parameters dwV olume [in] Specifies a new volume setting. The default setting is 0x99999999. Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, the return value is E_FUNC_ERROR.
  • Page 11: Battery Related Function

    Battery Related Function GetBatteryStatus This function gets main battery status. int GetBatteryStatus Parameters None. Return Values The return value can be one of the values in the following table. Return value Description battery high battery low battery critical battery charging no battery battery unknown Example...
  • Page 12 break; case 4: AfxMessageBox(_T("No Battery")); break; case 5: AfxMessageBox(_T("Battery Unknown")); break; Requirements OS V ersions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PT61 Programming Manual...
  • Page 13: Display Related Functions

    Display Related Functions BacklightOn This function will always turn on or off screen backlight. DWORD BacklightOn BOOL Parameters [in] Flag that indicates whether turn on screen backlight(TRUE) or turn off screen backlight(FALSE). Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are E_FUNC_ERROR, E_FUNC_PAR_ERROR.
  • Page 14: Display_Querybacklightintensity

    Display_QueryBacklightIntensity This function will return the backlight intensity of external power and battery power. DWORD Display_QueryBacklightIntensity LPDWORD lpdwACBacklight, LPDWORD lpdwBatteryBacklight Parameters lpdwACBacklight [out] The backlight intensity of external power. lpdwBatteryBacklight [out] The backlight intensity of battery power. Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are E_FUNC_ERROR, E_FUNC_NULLPTR.
  • Page 15 dwV alue2); AfxMessageBox(strTemp); Requirements OS V ersions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PT61 Programming Manual...
  • Page 16: Getbacklightstatus

    GetBacklightStatus This function gets screen backlight status. DWORD GetBacklightStatus Parameters None. Return Values The return value indicates whether screen backlight is 1 = screen backlight on or screen backlight is 0 = screen backlight off. Example DWORD dwResult; dwResult = GetBacklightStatus(); if(dwResult == 1) AfxMessageBox(_T("Backlight on"));...
  • Page 17: Poweronlcd

    PowerOnLCD This function turns on or off LCD power. DWORD PowerOnLCD BOOL Parameters [in] Flag that indicates whether turn on LCD power(TRUE) or turn off LCD power(FALSE). Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are E_FUNC_ERROR, E_FUNC_PAR_ERROR.
  • Page 18: Setbacklightpwm

    SetBacklightPWM This function adjusts screen backlight brightness. DWORD SetBacklightPWM int nACPowerPercent, nBatteryPercent Parameters nACPowerPercent,nBatteryPercent [in] One is brightness setting using AC power and the other is brightness setting using battery . These two members must be one of the values in the following table. nPercent Backlight brightness super...
  • Page 19: Keypad Related Functions

    KeyPad Related Functions EnablePowerButton This function will enable or disable power button. DWORD EnablePowerButton BOOL Parameters [in] Flag that indicates whether enable power button(TRUE) or disable power button(FALSE). Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are E_FUNC_ERROR, E_FUNC_PAR_ERROR.
  • Page 20: Getkeypadalphamode

    GetKeypadAlphaMode This function will get the current input mode. DWORD GetKeypadAlphaMode Parameters None. Return Values The return value can be one of the values in the following table. Return value Alpha mode numeric mode lowercase letter mode uppercase lette mode Example DWORD dwResult;...
  • Page 21: Sendkbdvisualkey

    SendKbdVisualKey This function sends a visual key to key buffer. DWORD SendKbdVisualKey BYTE Parameters [in] Specifies a virtual-key code. Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are E_FUNC_ERROR, E_FUNC_PAR_ERROR. Example CString strTemp; strTemp = "VisualKey";...
  • Page 22: Setkeypadalphamode

    SetKeypadAlphaMode This function will change input mode. DWORD SetKeypadAlphaMode nMode Parameters nMode [in] Flags for set input mode. This member must be one of the values in the following table. Value Alpha mode numeric mode lowercase letter mode uppercase letter mode Return Values If function succeeds, the return value is E_FUNC_SUCCEED.
  • Page 23: Led Related Functions

    LED Related Functions GetKeypadLEDStatus This function gets keypad LED status. BOOL GetKeypadLEDStatus Parameters None. Return Values The return value indicates whether keypad LED is on(TRUE) or keypad LED is off(FALSE). Example BOOL bResult; bResult = GetKeypadLEDStatus(); if(bResult == TRUE) AfxMessageBox(_T("Keypad LED on")); else if(bResult == FALSE) AfxMessageBox(_T("Keypad LED off"));...
  • Page 24: Goodreadledon

    GoodReadLEDOn This function turns on and off goodread LED. DWORD GoodReadLEDOn BOOL Parameters [in] Flag that indicates whether turn on goodread LED(TRUE) or turn off goodread LED(FALSE). Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are E_FUNC_ERROR, E_FUNC_PAR_ERROR.
  • Page 25: Keypadledon

    KeypadLEDOn This function always turns on or off keypad LED. DWORD KeypadLEDOn BOOL Parameters [in] Flag that indicates whether turn on keypad LED(TRUE) or turn off keypad LED(FALSE). Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are E_FUNC_ERROR, E_FUNC_PAR_ERROR.
  • Page 26: System Related Functions

    System Related Functions CallSuspend After called this function, terminal will enter suspend mode. void CallSuspend Parameters None. Return Values None. Example //suspend device CallSuspend(); Requirements OS V ersions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PT61 Programming Manual...
  • Page 27: Enableautoconnect

    EnableAutoConnect The EnableAutoConnect function turns Autoconnect on and off. BOOL EnableAutoConnect BOOL bEnable Parameters bEnable [in] Flag that indicates whether ActiveSync is being automatically executed (TRUE) or ActiveSync is being not automatically executed (FALSE) when user plug cable into terminal. Return Values Return TRUE if the operation is successful;...
  • Page 28: Registeralphakeynotification

    RegisterAlphaKeyNotification Register the application to SYSAPIAX.dll, so that SYSAPIAX.dll will send a windows message to the application when the alpha key pressed. DWORD RegisterAlphaKeyNotification HANDLE hWnd, UINT uMsg Parameters hWnd [in] The window handle of the application that is to receive the message. uMsg [in] The message value that is to be sent when alpha key pressed.
  • Page 29: Showchineseime

    ShowChineseIME The ShowChineseIME function display and hide the Chinese IME. BOOL ShowChineseIME BOOL bShow Parameters bShow [in] Flag that indicates whether display the Chinese IME(TRUE) or hide the Chinese IME(FALSE). Return Values Return TRUE if the operation is successful; otherwise FALSE. Remarks The Chinese IME only support in Chinese OS.
  • Page 30: Showdesktop

    ShowDesktop The ShowDesktop function display and hide all icons on desktop. BOOL ShowDesktop BOOL bShow Parameters bShow [in] Flag that indicates whether display the desktop(TRUE) or hide the desktop(FALSE). Return Values Return TRUE if the operation is successful; otherwise FALSE. Remarks After called this function with parameter FALSE, terminal will hide all icons on desktop.
  • Page 31: Showexploretoolbar

    ShowExploreToolbar The ShowExploreToolbar function display and hide toolbar on windows explore. BOOL ShowExploreToolbar BOOL bShow Parameters bShow [in] Flag that indicates whether display the toolbar on windows explore (TRUE) or hide the toolbar on windows explore (FALSE). Return Values Return TRUE if the operation is successful; otherwise FALSE. Remarks The ShowExploreToolbar function only effect the windows explorers that opened already .
  • Page 32: Showtaskbar

    ShowTaskbar The ShowTaskbar function display and hide the taskbar. BOOL ShowTaskbar BOOL bShow Parameters bShow [in] Flag that indicates whether display the taskbar(TRUE) or hide the taskbar(FALSE). Return Values Return TRUE if the operation is successful; otherwise FALSE. Remarks After called this function, terminal will display or hide taskbar. If taskbar is hide by this function, it need to call this function to display taskbar again.
  • Page 33: Unregisteralphakeynotification

    UnRegisterAlphaKeyNotification The UnregisterAlphaKeyNotification function requests that the application no longer receive alpha key pressed notification messages. DWORD UnregisterAlphaKeyNotification HANDLE hWnd, Parameters hWnd [in] The window handle of the application. Return Values Return 0 if the operation is successful, otherwise return 1. Example if(UnregisterAlphaKeyNotification(this->m_hWnd)) AfxMessageBox(_T("UnregisterAlphaKeyNotification FAIL!!"));...
  • Page 34: Vibrator Related Functions

    Vibrator Related Functions VibratorOn This function turns on or off Vibration indicator DWORD VibratorOn BOOL Parameters [in] Flag that indicates whether turn on vibrator(TRUE) or turn off vibrator(FALSE). Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value is E_FUNC_ERROR, E_FUNC_PAR_ERROR.
  • Page 35: Bluetooth Related Function

    Bluetooth Related Function BT_Enable This function enable Bluetooth device BOOL BT_Enable Parameters None. Return Values If function succeeds, the return value is TRUE. If function fails, the return value is FALSE. Example BOOL bResult; bResult = BT_Enable(); if(bResult == 0) AfxMessageBox(_T("Open Bluetooth fail"));...
  • Page 36: Bt_Disable

    BT_Disable This function disable Bluetooth device BOOL BT_Disable Parameters None. Return Values If function succeeds, the return value is TRUE. If function fails, the return value is FALSE. Example BOOL bResult; bResult = BT_Disable(); if(bResult == 0) AfxMessageBox(_T("Close Bluetooth fail")); Requirements OS V ersions: Windows CE 5.0 and later.
  • Page 37: Wireless Related Function

    Wireless Related Function WL_Enable This function enable wireless device. BOOL WL_Enable Parameters None. Return Values If function succeeds, the return value is TRUE. If function fails, the return value is FALSE. Example BOOL bResult; bResult = WL_Enable(); if(bResult == 0) AfxMessageBox(_T("Open wireless device fail"));...
  • Page 38: Wl_Disable

    WL_Disable This function disable wireless device BOOL WL_Disable Parameters None. Return Values If function succeeds, the return value is TRUE. If function fails, the return value is FALSE. Example BOOL bResult; bResult = WL_Disable(); if(bResult == 0) AfxMessageBox(_T("Close wireless device fail")); Requirements OS V ersions: Windows CE 5.0 and later.
  • Page 39: Scanapiax.dll

    SCANAPIAX.DLL We supply SCANAPIAX.DLL to allow programmer to control scan device status. There are several functions for user to use. User can use WINCE develop tool which like Visual Studio 2005 to develop application program to control scanner. In this library, there are three different ways to control scanner module. These are API_SCAN, Scan2Key and Scanner related functinos.
  • Page 40 Scan2Key Related Functions User use Scan2Key related functions to control scan.exe program. When scan.exe is loaded, scan data will send to key buffer. User application can be get scan data just like standard keyboard input.  PT_OpenScan2Key – Execute scan.exe to scan barcode data into Terminal key buffer.
  • Page 41: Api_Scan Rela Ted Functions

    API_SCAN Related Functions API_Register Register the application to SCANAPIAX.dll, so that SCANAPIAX.dll can communication with the application. It will also open scanner module to working mode. (About 3 seconds) BOOL API_Register HWND hwnd Parameters hwnd [in] the window handle which library will send message to report all activities of scanner. Return Values Return TRUE if the operation is successful, otherwise return FALSE.
  • Page 42: Api_Unregister

    API_Unregister Unregister the application from SCANAPIAX.dll and close scanner module. void API_Unregister Parameters None Return Values None. Example API_Unregister(); Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PT61 Programming Manual...
  • Page 43: Api_Getbardata

    API_GetBarData Get Barcode into the buffer. When you get the message SM_DA TA_READY , call this function to get the barcode data. UINT API_GetBarData LPBYTE buffer, UINT * uiLength, UINT * uiBarType Parameters buffer [out] buffer for string scanned data. uiLength [in/out] buffer size uiBarType...
  • Page 44 memset(pBuf, 0, uiSize+1); API_GetBarData((LPBYTE)pBuf, &uiSize, &uiType); strBarType.Format(_T("%d"), uiType); for(i = 0 ; i < strlen(pBuf); i++) strBarData += *(pBuf+i); AfxMessageBox( _T("Type:") + strBarType + _T("\r\nBarcode:") + strBarData); return 0; Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PT61...
  • Page 45: Api_Getbardatalength

    API_GetBarDataLength Get the scan data length. UINT API_GetBarDataLength Parameters None Return Values Scan data length Example if(message == SM_DA TA_READY){ CString strData; UINT uiSize, uiType, i,uiLength; char *pBuf; uiLength = API_GetBarDataLength(); if(uiLength == 0) strData = _T("No Data"); else{ uiSize = uiLength+1; pBuf = (char *)new char[uiSize];...
  • Page 46: Api_Getbartype

    API_GetBarType Get the barcode type. This function is no longer supported as of PT61. Always return zero. UINT API_GetBarType Parameters None Return Values Return the barcode type Remarks value Barcode value Barcode BC_CODE11(100) Code 11 BC_UPCE(114) UPCE BC_CODE39(101) Code 39 BC_MA TRIX_25(115) Matrix 25 BC_CODE93(102)
  • Page 47 Link DLL: scanapiax.dll Device: PT61 Programming Manual...
  • Page 48: Api_Geterror

    API_GetError Get the error code. DWORD API_GetError Parameters None Return Values The return value can be one of the following table: Constant Value Description ERR_WRITE_FAIL WM_USER+1 Send commands to scanner module failed. ERR_SETTING_FAIL WM_USER+2 Set scanner setting failed. ERR_SCANNER_NOT_OPEN WM_USER+3 Open scanner module failed. ERR_INV ALID_FILE WM_USER+4 Invalid setting file.
  • Page 49: Api_Getsyserror

    API_GetSysError Get the system error code. DWORD API_GetSysError Parameters None Return Values Return the system error code that is returned by GetLastError(). The description of system error code can be find in MSDN. Example dwError = API_GetSysError(); strMess.Format(_T("System Error Code: %d"), dwError); AfxMessageBox(strMess);...
  • Page 50: Api_Goodread

    API_GoodRead This function plays a sound when buzzer indication of scan module is enable and flashes the goodread LED when the LED indication of scan module is enable. void API_GoodRead Parameters None Return Values None. Remarks Use API_GoodRead() to indicate user barcode data is scanned. The buzzer indication of scan module can be set by scan configuration program in control panel.
  • Page 51: Api_Loadsettingsfromfile

    API_LoadSettingsFromFile Load scanner setting from file. BOOL API_LoadSettingsFromFile LPCTSTR filename Parameters filename [in] the scanner setting file(*.axs) Return Values Return TRUE if the operation is successful, otherwise return FALSE. Example CString strFile; CFileDialog dlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST | OFN_PA THMUSTEXIST); if(dlg.DoModal() != IDOK) return;...
  • Page 52: Api_Reset

    API_Reset Reset the scanner setting to the default. BOOL API_Reset Parameters None Return Values Return TRUE if the operation is successful, otherwise return FALSE. Example if(API_Reset()) AfxMessageBox(_T("Reset Succeed")); else AfxMessageBox(_T("Reset Fail")); Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll...
  • Page 53: Api_Resetbardata

    API_ResetBarData Clear the data buffer that the next new scan data can come in. void API_ResetBarData Parameters None Return Values None. Example API_ResetBarData(); Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PT61 Programming Manual...
  • Page 54: Api_Savesettingstofile

    API_SaveSettingsToFile Save current scanner settings to file. The extension file name is “axs”. BOOL API_SaveSettingsToFile LPCTSTR filename Parameters filename [in] the file name for the setting file. Return Values Return TRUE if the operation is successful, otherwise return FALSE. Example CString strFile;...
  • Page 55: Api_Savesettingstoscanner

    API_SaveSettingsToScanner Write the current scanner setting into scanner. BOOL API_SaveSettingsToScanner Parameters None Return Values Return TRUE if the operation is successful, otherwise return FALSE. Example if(API_SaveSettingsToScanner()) AfxMessageBox(_T("Save to Scanner Succeed")); else AfxMessageBox(_T("Save to Scannere Fail")); Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll...
  • Page 56: S2K_Isload

    S2K_IsLoad Check the application scan.exe(scan barcode data into key buffer) is running. BOOL S2K_IsLoad Parameters None Return Values The return value TRUE indicates that scan.exe is running. The return value FALSE indicates that scan.exe is not running. Example if(S2K_IsLoad()){ AfxMessageBox(_T("scan.exe load")); else AfxMessageBox(_T("scan.exe does not load"));...
  • Page 57: S2K_Load

    S2K_Load Load or unload the scan.exe. BOOL S2K_Load BOOL bLoad, DWORD dwTimeOut Parameters bLoad [in] To set true to load scan.exe and false to unload scan.exe dwTimeOut [in] When unload scan.exe it will wait until the scan.exe closed or timeout by this parameter. Return Values Return TRUE if the operation is successful, otherwise return FALSE.
  • Page 58: Scan_Querystatus

    SCAN_QueryStatus Query current scanner setting. BOOL SCAN_QueryStatus int nCommand1, int nCommand2, char *pReturn Parameters nCommand1 [in] See scan command table. nCommand2 [in] See scan command table. pReturn [out] The current scanner setting. This buffer size must be large than 100. Return Values Return TRUE if the operation is successful, otherwise return FALSE.
  • Page 59: Scan_Sendcommand

    SCAN_SendCommand Send scanner command to change scanner status. BOOL SCAN_SendCommand int nCommand1, int nCommand2, char *pV alue Parameters nCommand1 [in] See scan command table. nCommand2 [in] See scan command table. pV alue [in] See scan command table. Return Values Return TRUE if the operation is successful, otherwise return FALSE. Example //Enable Buzzer indication setting if(SCAN_SendCommand(5, 3, “1”))
  • Page 60: Scan_Resumesystem

    SCAN_ResumeSystem Enable/Disable scan key to resume system DWORD SCAN_ResumeSystem BOOL Parameters [in] Flag that indicates whether enable scankey to resume system(TRUE) or disable scankey to resume system(FALSE). Return Values Return 0 if function succeed; otherwise return E_FUNC_ERROR. Example //Enable scan key to resume system if(SCAN_ResumeSystem(1) == 0) AfxMessageBox(_T("Enable scan key to resume system succeed"));...
  • Page 61: Scan_Batchsetting

    SCAN_BatchSetting Setup scanner in batch command DWORD SCAN_BatchSetting ScannerSetting setting Parameters setting [in] The scanner setting configure. The barcode setting refer to scan command table. Return Values Return: FALSE if the operation is success, otherwise return E_SCAN_INV ALID_HANDLE, E_SCAN_SETTING_FAIL. Example ScannerSetting setting;...
  • Page 62: Scan_Batchread

    SCAN_BatchRead Read scanner setting in batch command DWORD SCAN_BatcRead ScannerSetting *setting Parameters setting [in] The buffer is to receive scanner setting configure. The barcode setting refer to scan command table. Return Values Return FALSE if the operation is success, otherwise return E_SCAN_INV ALID_HANDLE. Example ScannerSetting setting;...
  • Page 63: Scan2Key Related Functions

    Scan2Key Related Functions PT_OpenScan2Key Execute scan.exe to scan barcode data into Terminal key buffer. BOOL PT_OpenScan2Key Parameters None Return Values Return TRUE if the operation is successful, otherwise return FALSE. Example BOOL bResult; bResult = PT_OpenScan2Key(); if(!bResult) AfxMessageBox(_T("PT_OpenScan2Key fail")); Requirements OS V ersions: Windows CE 5.0 and later.
  • Page 64: Pt_Closescan2Key

    PT_CloseScan2Key Close scan.exe. void PT_CloseScan2Key Parameters None Return Values None. Example PT_CloseScan2Key() Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PT61 Programming Manual...
  • Page 65: Pt_Settodefault

    PT_SetToDefault Reset the scanner setting. All scanner setting will reset to default value. int PT_SetT oDefault Parameters None Return Values Return 1 if the operation is successful, otherwise return 0. Example if(!PT_SetToDefault()) AfxMessageBox(_T("PT_SetToDefault fail")); Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll...
  • Page 66: Scanner Related Functions

    Scanner Related Functions PT_EnableScanner Enable scanner to scan barcode. (About 3 seconds) This function creates a thread to get scan data from scanner module and store scan data in the system buffer. Application can use function call PT_GetBarcodeData to get scan data from system buffer. int PT_EnableScanner Parameters None...
  • Page 67: Pt_Disablescanner

    PT_DisableScanner This function will close scanner module. void PT_DisableScanner Parameters None Return Values None. Example PT_DisableScanner(); Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PT61 Programming Manual...
  • Page 68: Pt_Checkbarcodedata

    PT_CheckBarcodeData Check whether there is available barcode data in system buffer. BOOL PT_CheckBarcodeData Parameters None Return Values This function returns TRUE if there are barcode data in system buffer. This function returns FALSE if there are no barcode data in system buffer. Example if(PT_CheckBarcodeData()) m_strScanData = _T("There are barcode data in system buffer");...
  • Page 69: Pt_Getbarcodedata

    PT_GetBarcodeData Get Barcode data and type from system buffer. BOOL PT_GetBarcodeData UINT * uiBarType, Char * pBuffer, UINT * uiMaxBufferLen Parameters uiBarType [out] barcode type. This parameter is ignored and should be set to NULL pBuffer [out] buffer for storing scanned data.. uiMaxBufferLen [in/out] The max buffer size Return Values...
  • Page 70 Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PT61 Programming Manual...
  • Page 71: Pt_Setdefault

    PT_SetDefault Reset the scanner setting to default value. BOOL PT_SetDefault Parameters None Return Values Return TRUE if the operation is successful, otherwise return FALSE. Example if(PT_SetDefault()) AfxMessageBox(_T("PT_SetDefault succeed")); else AfxMessageBox(_T("PT_SetDefault fail")); Requirements OS V ersions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll...
  • Page 72: Scan Key Related Functions

    Scan Key Related Functions EnableTriggerKey This function will enable or disable scan key . DWORD EnableTriggerKey BOOL bEnable Parameters bEnable [in] Flag that indicates whether enable scan key(TRUE) or disable scan key(FALSE). Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, the return value is E_FUNC_ERROR, E_FUNC_PAR_ERROR.
  • Page 73: Getlibraryv Ersion

    GetLibraryV ersion Get library version number. int GetLibraryV ersion Parameters None Return Values The version number. If the return value is 101, it means that dll version is 1.01 Example int nV ersion; CString strTemp; nV ersion = GetLibraryV ersion(); strTemp.Format(_T("V ersion = %d"), nV ersion);...
  • Page 74: Gettriggerkeystatus

    GetTriggerKeyStatus This function will get scan key status. DWORD GetTriggerKeyStatus Parameters None. Return Values The return value 1 indicates that scan key is enable. The return value 0 indicates that scan key is disable. Example if(GetTriggerKeyStatus()) AfxMessageBox(_T("scan key ensable!")); else AfxMessageBox(_T("scan key disable!"));...
  • Page 75: Presstriggerkey

    PressTriggerKey This function will trigger scan key . DWORD PressTriggerKey BOOL bPress Parameters bPress [in] Flag that indicates whether press scan key(TRUE) or release scan key(FALSE). Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, the return value is E_FUNC_ERROR.
  • Page 76: Triggerkeystatus

    TriggerKeyStatus This function will get scan key press status. DWORD TriggerKeyStatus Parameters None. Return Values The return value 1 indicates that scan key is pressed. The return value 0 indicates that scan key is released. Example if(TriggerKeyStatus()) AfxMessageBox(_T("scan key pressed!")); else AfxMessageBox(_T("scan key release!"));...
  • Page 77: Scan Command Table

    Scan Command Table Command1 Command2 Value 0: Disable Indication LED indication 1: Enable * 0: Disable Buzzer indication 1: Enable * 0: Disable * Vibrator 1: Enable 0: Disable * Resume System Using ScanKey 1: Enable 0: Before code data * Transmission Code ID position 1: After code data...
  • Page 78 1~30 See Note 3 Scan Timeout (Sec) 0~255 (0: Disable) See Note 3 Idle Timeout (Sec) 0x01 ~ 0x7F ASCII code (1-10 characters) String setting Preamble characters settings 00 * 0x01 ~ 0x7F ASCII code (1-10 characters) Postamble characters settings 00 * 0: Disable * Code 11...
  • Page 79 0: Disable * Code ID setting 0x01 ~ 0x7F ASCII code(1 bytes) 0: Disable * UCC/EAN 128 1: Enable 0: Disable * ISBT 128 1: Enable 0: Disable ISBT 128 Transmit Identifier Data 1: Enable * 0: Disable ISBT 128 Pre-Defined Concatenation 1: Enable * 0: =A + =% * ISBT 128 Form:...
  • Page 80 EAN 13 Read 1: Enable * 0: Disable Transmit Check Digit 1: Enable * 0: Disable * Code ID setting 0x01 ~ 0x7F ASCII code(1 bytes) 0: Disable * ISBN conversion 1: Enable 0: Disable * ISBN Supplement Required 1: Enable 0: Disable * ISMN conversion 1: Enable...
  • Page 81 0: Disable * Code ID setting 0x01 ~ 0x7F ASCII code(1 bytes) 0: Disable * Telepen Read 1: Enable 0: Disable * Code ID setting 0x01 ~ 0x7F ASCII code(1 bytes) 0: Disable * Full ASCII 1: Enable 0: Disable UPCA Read 1: Enable *...
  • Page 82 0: Disable * Code ID setting 0x01 ~ 0x7F ASCII code(1 bytes) 0: Disable * UPC/EAN General Supplements Required 1: Enable 0: Disable * Two Digit Supplements 1: Enable 0: Disable * Five Digit Supplements 1: Enable 0: Disable * Two Digit Redundancy 1: Enable 0: Disable *...
  • Page 83 Note1: This command will set all code id settings to the proprietary value. It can' t be query. Barcode value Barcode value Code 11 MSI Plessey Code 39 UK Plessey Code 93 Telepen Code 128 UPCA Codabar UPCE EAN8 Matrix 25 EAN13 IA TA 25 Industrial 2 of 5...
  • Page 84 Example: Cmd1 Cmd2 Value 670C 6514 6710 Code 128: Can only read 12 or 16 the length of the bar code. Code39: Can only read 20 the length of the bar code. Note 3: ScanTimeout: the maximum time, in seconds, during which the laser remains on without decoding any barcode.
  • Page 85: Function Return Values

    Function Return Values Constant Value Description E_FUNC_SUCCEED 0x00000000 The function returned without error. E_FUNC_ERROR 0x00000001 The function returned error. E_FUNC_NULLPTR 0x00000002 A null pointer was passed to the function. E_FUNC_PAR_ERROR 0x00000003 A invalid parameter was passed to the function. E_SCAN_FUNC_SUCCEED 0x00000000 Scanner work succeed E_SCAN_INV ALID_HANDLE 0x00000001 Scanner not ready maybe other application using...

Table of Contents