Argox PA-60 Programming Manual
Hide thumbs Also See for PA-60:
Table of Contents

Advertisement

Quick Links

PA-60 Mobile Computer
Programming Manual
DOC NO. UM-PA605-02
June. 2012
Version 1.0

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PA-60 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Argox PA-60

  • Page 1 PA-60 Mobile Computer Programming Manual DOC NO. UM-PA605-02 June. 2012 Version 1.0...
  • Page 2 Table of Contents OVERVIEW..........................................2 SDK FUNCTIONS........................................3 SYSAPIAX.DLL........................................4 ..................................7 UDIO ELA TED UNCTIONS Audio_GetV olume................................7 Audio_SetVolume................................8 ................................9 ATTERY ELATED UNCTION GetBatteryStatus................................9 ................................11 ISPLA Y ELA TED UNCTIONS BacklightOn..................................11 Display_QueryBacklightIntensity..........................12 GetBacklightStatus................................14 PowerOnLCD................................15 SetBacklightPWM.................................16 EnableTouchPanel................................17 GetTouchPanelStatus..............................18 ................................19 ELA TED UNCTIONS EnablePowerButton..............................19 GetKeypadAlphaMode..............................20 SendKbdVisualKey................................21 SetKeypadAlphaMode..............................22 LED R ...................................23...
  • Page 3 ................................34 IBRATOR ELATED UNCTIONS VibratorOn..................................34 ................................35 IRELESS ELATED UNCTION WL_Enable..................................35 WL_Disable..................................36 ...............................37 LUETOOTH ELATED UNCTION BT_Enable..................................37 BT_Disable..................................38 BT_On.....................................39 BT_Off....................................40 SetDiscoverMode................................41 GetDiscoverMode.................................42 SetSPPService................................43 GetSPPService................................44 SetFTPService................................45 GetFTPService................................46 SetFTPWriteable................................47 GetFTPWriteable................................48 SetFTPShareFolder..............................49 GetFTPShareFolder..............................50 InitSearchBTDevice..............................52 FindNextBTDevice................................54 EndSearchBTDevice..............................56 InitSearchFTPDevice..............................57 FindFirstFTPDevice..............................58 FindNextFTPDevice..............................60 PairDevice..................................62 UnPairDevice................................63 GetComInfo..................................64 ConnectDevice................................66 GetConnectStatus................................67 GetSPPClientChannel..............................69 FindFirstFTPFile................................70 FindNextFTPFile................................71...
  • Page 4 ..................................77 LUETOOTH TRUCTURE CONNECT_INFO Structure.............................77 FTP_FILE Structure..............................78 SCANAPIAX.DLL......................................79 API_SCAN R ..............................81 ELATED UNCTIONS API_Register...................................81 API_Unregister................................82 API_GetBarData................................83 API_GetBarDataLength.............................85 API_GetBarType................................86 API_GetError................................88 API_GetSysError................................89 API_GoodRead................................90 API_LoadSettingsFromFile............................91 API_Reset..................................92 API_ResetBarData...............................93 API_SaveSettingsToFile...............................94 API_SaveSettingsToScanner............................95 S2K_IsLoad..................................96 S2K_Load..................................97 SCAN_QueryStatus..............................98 SCAN_SendCommand..............................99 SCAN_ResumeSystem..............................100 SCAN_BatchSetting..............................101 SCAN_BatchRead..............................102 GetScannerDevice..............................103 SCAN_EnablePowerOnAlert..........................104 SCAN_GetPowerOnAlert............................105 SCAN_BatchSetting_V1............................106 SCAN_BatchRead_V1..............................107 ..............................108 ELATED UNCTIONS PT_OpenScan2Key..............................108 PT_CloseScan2Key..............................109...
  • Page 5 PT_GetBarcodeData..............................114 PT_SetDefault................................116 ..............................117 ELATED UNCTIONS EnableTriggerKey...............................117 GetLibraryV ersion...............................118 GetTriggerKeyStatus..............................119 PressTriggerKey.................................120 TriggerKeyStatus................................121 SCAN COMMAND TABLE..................................122 FUNCTION RETURN V ALUES................................134 Programming Manual...
  • Page 6: 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 7: 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 8: 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 9: Programming Manual

    the alpha key pressed.  ShowChineseIME – Display and hide the Chinese IME.  ShowDeskTop – Display and hide all icons on desktop.  ShowExploreToolbar – Display and hide toolbar on windows explorer.  ShowTaskbar – Display and hide taskbar. ...
  • Page 10: Programming Manual

     ConnectDevice – Connect to Bluetooth device for SPP or FTP.  GetConnectStatus – Query the device connected status.  GetSPPClientChannel – Get SPP channel.  FindFirstFTPFile – Get first file information from share folder in connected device.  FindNextFTPFile –...
  • Page 11: F Unctions

    Audio Related Functions Audio_GetVolume This function queries the current volume setting. DWORD Audio_GetVolume LPDWORD lpdwVolume Parameters lpdwVolume [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. Example DWORD dwResult, dwVolume;...
  • Page 12: Audio_Setvolume

    Audio_SetVolume This function sets the current volume setting. DWORD Audio_SetVolume DWORD dwVolume Parameters dwVolume [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. Example DWORD dwResult,dwVolume;...
  • Page 13: F Unction

    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 14 AfxMessageBox(_T("Battery Charging")); break; case 4: AfxMessageBox(_T("No Battery")); break; case 5: AfxMessageBox(_T("Battery Unknown")); break; Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 15: F Unctions

    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 16: 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 17 Example DWORD dwResult, dwValue1, dwValue2; dwResult = Display_QueryBacklightIntensity(&dwValue1, &dwValue2); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("Display_QueryBacklightIntensity fail")); else CString strTemp; strTemp.Format(_T("AC backlight intensity: %d, Battery backlight intensity: %d"), dwValue1, dwValue2); AfxMessageBox(strTemp); Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 18: 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 19: 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 20: 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.
  • Page 21: Enabletouchpanel

    EnableTouchPanel This function enable/disable the touch panel DWORD EnableTouchPanel BOOL bEnable Parameters bEnable [in] Set TRUE to enable touch panel and FLASE to disable touch panel 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 DWORD dwResult = EnableTouchPanel(0);...
  • Page 22: Gettouchpanelstatus

    GetTouchPanelStatus Query touch panel status DWORD GetTouchPanelStatus LPBOOL lpEnable Parameters lpEnable [out] The touch panel status. Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are E_FUNC_ERROR. Example BOOL bStatus; DWORD dwResult = GetTouchPanelStatus(&bStatus); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("EnableTouchPanel fail"));...
  • Page 23: F Unctions

    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 24: 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 25: 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 26: 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 27: F Unctions

    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 28: 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 29: 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 30: F Unctions

    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 Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 31: 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 32: 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 33: 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 34: 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 35: 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 36: 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 37: 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 38: V Ibrator R Elated F Unctions

    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 LED(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 39: W Ireless R Elated F Unction

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

    WL_Disable This function disable WLAN power. BOOL WL_Disable Parameters None. Return Values If function succeeds, the return value is TRUE. If function fails, the return value is FALSE. Example DWORD dwResult; dwResult = WL_Disable(); if(dwResult == 0) AfxMessageBox(_T("Close wireless device fail")); Requirements OS Versions: Windows CE 5.0 and later.
  • Page 41: B Luetooth R Elated F Unction

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

    BT_Disable This function disable Bluetooth application and power. BOOL BT_Disable Parameters None. Return Values If function succeeds, the return value is TRUE. If function fails, the return value is FALSE. Example DWORD dwResult; dwResult = BT_Disable(); if(dwResult == 0) AfxMessageBox(_T("Close Bluetooth fail")); Requirements OS Versions: Windows CE 5.0 and later.
  • Page 43: Bt_On

    BT_On To ENABLE the Bluetooth function and power. BOOL BT_On Parameters None. Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are BT_ERR_CREATE_FAIL, BT_ERR_INUSING. Example BOOL bResult; bResult = BT_On(); if(bResult != E_FUNC_SUCCEED) AfxMessageBox(_T("Bluetooth enable fail"));...
  • Page 44: Bt_Off

    BT_Off To DISABLE the Bluetooth function and power. void BT_Off Parameters None. Returned Values None Example BT_Off(); Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 45: Setdiscovermode

    SetDiscoverMode Enable or disable terminal discovered mode. DWORD SetDiscoverMode BOOL bEnable Parameters bEnable [in] Flag that indicates whether to enable (TRUE) or disable (FALSE) the terminal discovered mode Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned value is BT_ERR_SETTING_FAIL.
  • Page 46: Getdiscovermode

    GetDiscoverMode Get terminal current discovered status. BOOL GetDiscoverMode Parameters None Returned Values Return TRUE if terminal can be discovered, otherwise return FALSE. Example if(GetDiscoverMode()) AfxMessageBox(_T("Discover mode is enable")); Else AfxMessageBox(_T(“Discover mode is disable”)); Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll...
  • Page 47: Setsppservice

    SetSPPService Enable or disable Bluetooth serial port profile service. DWORD SetSPPService BOOL bEnable Parameters bEnable [in] Flag that indicates whether to enable (TRUE) or disable (FALSE) the serial port profile service mode Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are BT_ERR_SETTING_FAIL, BT_ERR_REG_DEV_FAIL, BT_ERR_SPP_COM_FAIL.
  • Page 48: Getsppservice

    GetSPPService Get terminal current serial port profile service status. BOOL GetSPPService Parameters None Returned Values Return TRUE if SPP service is enable, otherwise return FALSE. Example if(GetSPPService()) AfxMessageBox(_T("SPP service is enable")); Else AfxMessageBox(_T(“SPP service is disable”)); Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll...
  • Page 49: Setftpservice

    SetFTPService Enable or disable File Transfer Profile service. DWORD SetFTPService BOOL bEnable Parameters bEnable [in] Flag that indicates whether to enable (TRUE) or disable (FALSE) the File Transfer Profile service mode Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are BT_ERR_SETTING_FAIL.
  • Page 50: Getftpservice

    GetFTPService Get terminal current File Transfer Profiel service status. BOOL GetFTPService Parameters None Returned Values Return TRUE if FTP service is enable, otherwise return FALSE. Example if(GetFTPService()) AfxMessageBox(_T("FTP service is enable")); Else AfxMessageBox(_T(“FTP service is disable”)); Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll...
  • Page 51: Setftpwriteable

    SetFTPWriteable Enable or disable File Transfer Profile writable. DWORD SetFTPWriteable BOOL bWriteable Parameters bWriteable [in] Flag that indicates whether to enable (TRUE) or disable (FALSE) the File Transfer Profile writeable mode Returned Values Return E_FUNC_SUCCEED if the operation is successful. Example if(SetFTPWriteable(TRUE) != E_FUNC_SUCCEED) AfxMessageBox(_T("Set FTP writeable fail"));...
  • Page 52: Getftpwriteable

    GetFTPWriteable Get terminal current File Transfer Profile writeable status. BOOL GetFTPWriteable Parameters None Returned Values Return TRUE if FTP writeable is enable, otherwise return FALSE. Example if(GetFTPWriteable()) AfxMessageBox(_T("FTP service is writeable")); else AfxMessageBox(_T(“FTP service is diswriteable)); Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll...
  • Page 53: Setftpsharefolder

    SetFTPShareFolder Setup the File Transfer Profile share folder. DWORD SetFTPShareFolder WCHAR *strShareFolder Parameters strShareFolder [in] The folder for File Transfer Profile. Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned value is E_FUNC_PAR_ERROR. Example if(SetFTPShareFolder(“\\Temp”) != E_FUNC_SUCCEED) AfxMessageBox(_T("Set FTP Share Folder fail!!"));...
  • Page 54: Getftpsharefolder

    GetFTPShareFolder Get terminal current File Transfer Profile share folder. DWORD GetFTPShareFolder WCHAR *strShareFolder, *nFolderLen Parameters strShareFolder [out] The buffer to receive the share folder string nFolderLen [in/out] The strShareFolder buffer max size. If terminal current share folder length > nFolderLen, the nFolderLen receive current share folder length. Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED.
  • Page 55 Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 56: Initsearchbtdevice

    InitSearchBTDevice This function initiates search information. DWORD InitSearchBTDevice HANDLE *hLookup Parameters hLookup [out] Handle to be used when calling the FindNextBTDevice & EndSearchBTDevice function Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_ERROR., BT_ERR_DEVICE_ERROR. Remarks Must call EndSearchBTDevice function frees the handle after calls to the InitSearchBTDevice and FindNextBTDevice function.
  • Page 57 Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 58: Findnextbtdevice

    FindNextBTDevice This function retrieves the results of an nearby Bluetooth device search. DWORD FindNextBTDevice HANDLE hLookup, LPTSTR szDeviceName, ULONGLONG *btAddress, nNameLen Parameters hLookup [in] Handle obtained from InitSearchBTDevice function szDeviceName [out] The buffer to receive the device name string btAddress [out] Receive the device address of 64-bit unsigned integer nNameLen [in] The szDeviceName buffer max size.
  • Page 59 HANDLE hLookup; ULONGLONG btAddress; WCHAR szAddress[16], szDeviceName[128]; dwRe = InitSearchBTDevice(&hLookup) while(dwRe == E_FUNC_SUCCEED){ dwRe = FindNextBTDevice(hLookup, szDeviceName, &btAddress, 256); if(dwRe == BT_ERR_DEVICE_ERROR) break; ………… wsprintf(szAddress, L"%04X%08X", GET_NAP(btAddress), GET_SAP(btAddress)); ………… EndSearchBTDevice(hLookup); Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60...
  • Page 60: Endsearchbtdevice

    EndSearchBTDevice This function frees the search handle. DWORD EndSearchBTDevice HANDLE hLookup Parameters hLookup [in] Handle obtained from InitSearchBTDevice function Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_ERROR, BT_ERR_DEVICE_ERROR. Example DWORD dwRe;...
  • Page 61: Initsearchftpdevice

    InitSearchFTPDevice Initial search Bluetooth device support File Transfer Profile service. DWORD InitSearchFTPDevice Parameters None Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_ERROR, BT_ERR_DEVICE_ERROR. Example DWORD dwPos, dwRe; WCHAR szDeviceName[128]; ULONGLONG btAddress;...
  • Page 62: Findfirstftpdevice

    FindFirstFTPDevice Get the first searched device position information after calling InitSearchFTPDevice(). DWORD FindFirstFTPDevice DWORD *dwPos, LPTSTR szDeviceName, ULONGLONG *btAddress, nNameLen Parameters dwPos [in/out] a reference to a position value returned by FindFirstBTDevice or FindNextBTDevice function szDeviceName [out] The buffer to receive the device name string btAddress [out] Receive the device address of 64-bit unsigned integer nNameLen...
  • Page 63 dwRe = FindFirstFTPDevice(&dwPos, szDeviceName, & btAddress, 256); while(dwRe == E_FUNC_SUCCEED){ FindNextFPTDevice(&dwPos, szDeviceName, & btAddress, 256); if(dwRe != E_FUNC_SUCCEED) break; ………… wsprintf(szAddress, L"%04X%08X", GET_NAP(btAddress), GET_SAP(btAddress)); ………… Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 64: Findnextftpdevice

    FindNextFTPDevice Get the next searched device position information. DWORD FindNextFTPDevice DWORD *dwPos, LPTSTR szDeviceName, ULONGLONG *btAddress, nNameLen Parameters dwPos [in/out] a reference to a position value returned by FindFirstBTDevice or FindNextBTDevice function szDeviceName [out] The buffer to receive the device name string btAddress [out] Receive the device address of 64-bit unsigned integer nNameLen...
  • Page 65 dwRe = FindFirstFTPDevice(&dwPos, szDeviceName, & btAddress, 256); while(dwRe == E_FUNC_SUCCEED){ FindNextFPTDevice(&dwPos, szDeviceName, & btAddress, 256); if(dwRe != E_FUNC_SUCCEED) break; ………… wsprintf(szAddress, L"%04X%08X", GET_NAP(btAddress), GET_SAP(btAddress)); ………… Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 66: Pairdevice

    PairDevice Pair terminal with other device. DWORD PairDevice ULONGLONG btAddress unsigned char PinCode[16] Parameters btAddress [in] The device address for pair with PinCode [in] The pin code for connection Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are BT_ERR_PAIR_FAIL, BT_ERR_DEVICE_ERROR.
  • Page 67: Unpairdevice

    UnPairDevice Unpair terminal with other device. DWORD UnPairDevice ULONGLONG btAddress Parameters btAddress [in] The device address for unpair Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned value is BT_ERR_DEVICE_ERROR. Example PairDevice(btAddress, PinCode); ....
  • Page 68: Getcominfo

    GetComInfo Get com identifier index and amount from device hardware. DWORD GetComInfo int *nComSum, LPCWSTR pComValue, *nComValueLen Parameters nComSum [out] Receive the device com amount pComValue [out] The buffer to receive the device com identifier index nComValueLen [in/out] The pComValue buffer max size. If terminal com value length > nComValueLen, the nComValueLen receive current com value length.
  • Page 69 Requirements OS Versions: Windows CE 5.0 and later. Header: sysapiax.h Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 70: Connectdevice

    ConnectDevice Connect to Bluetooth device for SPP or FTP. DWORD ConnectDevice ULONGLONG btAddress, CONNECT_INFO *Info, BOOL nConnect Parameters btAddress [in] The device address for connect Info [in] The device connect information., see CONNECT_INFO data structure. nConnect [in] Connect status. 1  connect, 0  disconnect Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED.
  • Page 71: Getconnectstatus

    GetConnectStatus Query the device connect status. DWORD GetConnectStatus ULONGLONG btAddress, int nConnectType, LPCWSTR pCom, *nStatus Parameters btAddress [in] Bluetooth device address nConnectType [in] Connect profile type. 1 Serial port profile, 2  File transfer profile pCom [in] The connect com for Serial port profile, must be four characters long.. Contains "COM"+ com identifier index, for example "COM7".
  • Page 72 Link Library: sysapiax.lib Link DLL: sysapiax.dll Device: PA60 Programming Manual...
  • Page 73: Getsppclientchannel

    GetSPPClientChannel Get the device serial port profile channel. DWORD GetSPPClientChannel ULONGLONG btAddress, *nChannel Parameters btAddress [in] The device address which to get SPP channel nChannel [out] Receive queried channel Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_ERROR, BT_ERR_DEVICE_ERROR.
  • Page 74: Findfirstftpfile

    FindFirstFTPFile Get first file information from share folder in the connected device. DWORD FindFirstFTPFile WCHAR *path, FTP_FILE *File Parameters path [in] The path of connected device for search file. File [out] The first searched file information in the path, see FTP_FILE data structure.
  • Page 75: Findnextftpfile

    FindNextFTPFile Get next file information from share folder in the connected device. DWORD FindNextFTPFile FTP_FILE *File Parameters File [out] The received file information, see FTP_FILE data structure. Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT, BT_ERR_FTP_EMPTY_FILE.
  • Page 76: Getftpfile

    GetFTPFile Get file from share folder in the connected device. DWORD GetFTPFile LPCWSTR pTargetFile Parameters pTargetFile [in] The file to get from connected device Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
  • Page 77: Putftpfile

    PutFTPFile Send file to share folder in the connected device. DWORD PutFTPFile LPCWSTR pSourceFile, LPCWSTR pTargetPath Parameters pSourceFile [in] The source file in the share folder to transfer to connected device. pTargetPath [in] The target path in the connected device to save file. Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED.
  • Page 78: Createftpfolder

    CreateFTPFolder Create a new folder to share folder in the connected device. DWORD CreateFTPFolder LPCWSTR pTarget Parameters pTarget [in] The folder which be created to share folder in the connected device Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
  • Page 79: Deleteftpfolder

    DeleteFTPFolder Delete folder from share folder in connected device. DWORD DeleteFTPFolder LPCWSTR pTarget Parameters pTarget [in] The folder will be deleted from share folder in the connected device Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
  • Page 80: Deleteftpfile

    DeleteFTPFile Delete file from share folder in connected device. DWORD DeleteFTPFile LPCWSTR pTarget Parameters pTarget [in] The file will be deleted from share folder in the connected device. Returned Values If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
  • Page 81: B Luetooth S Tructure

    Bluetooth Structure CONNECT_INFO Structure This setting file contains information used by ConnectDevice Struct CONNECT_INFO int nChannel; int nConnectType; WCHAR strCom[6]; Members nChannel The connect channel for Serial port profile nCannectType Connect profile type. 1 Serial port profile, 2  File transfer profile strCom The connect com for Serial port profile, must be four characters long..
  • Page 82: Ftp_File Structure

    FTP_FILE Structure This setting file contains information used by FindFirstFTPFile, FindNextFTPFile Struct FTP_FILE int nFileType; WCHAR strPath[260]; WCHAR strFile[260]; DWORD dwFileSize; Members nFileType File object profile type. 0 File, 1 Folder strPath The file path strFile The file name; It will be null if the object is a folder dwFileSize The file size , in bytes;...
  • Page 83: 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 84  SCAN_GetPowerOnAlert—Get scanner power on alert status  SCAN_BatchSetting_V1 – Setup scanner in batch command.  SCAN_BatchRead_V1 – Read scanner setting in batch command. 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.
  • Page 85: Api_Scan R Elated F Unctions

    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. BOOL API_Register HWND hwnd Parameters hwnd [in] the window handle which library will send message to report all activities of scanner.
  • Page 86: 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 Versions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PA60 Programming Manual...
  • Page 87: Api_Getbardata

    API_GetBarData Get Barcode into the buffer. When you get the message SM_DATA_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 [out] barcode type Return Values...
  • Page 88 pBuf = (char *)new char[uiSize+1]; 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 Versions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll...
  • Page 89: Api_Getbardatalength

    API_GetBarDataLength Get the scan data length. UINT API_GetBarDataLength Parameters None Return Values Scan data length Example if(message == SM_DATA_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 90: Api_Getbartype

    API_GetBarType Get the barcode type. UINT API_GetBarType Parameters None Return Values Return the barcode type Remarks value Barcode value Barcode BC_CODE11(100) Code 11 BC_UPCA(113) UPCA BC_CODE39(101) Code 39 BC_UPCE(114) UPCE BC_CODE93(102) Code 93 BC_MATRIX_25(115) Matrix 25 BC_CODE128(103) Code 128 BC_PDF417(116) PDF 417 BC_CODABAR(104) Codabar...
  • Page 91 Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PA60 Programming Manual...
  • Page 92: 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 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_INVALID_FILE WM_USER+4 Invalid setting file.
  • Page 93: 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 94: 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 95: 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_PATHMUSTEXIST); if(dlg.DoModal() != IDOK) return;...
  • Page 96: 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 Versions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PA60...
  • Page 97: 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 Versions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PA60 Programming Manual...
  • Page 98: 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 99: 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 Versions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll...
  • Page 100: 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 101: 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.
  • Page 102: 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 103: Scan_Sendcommand

    SCAN_SendCommand Send scanner command to change scanner status. BOOL SCAN_SendCommand int nCommand1, int nCommand2, char *pValue Parameters nCommand1 [in] See scan command table. nCommand2 [in] See scan command table. pValue [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 104: Scan_Resumesystem

    SCAN_ResumeSystem Enable/Disable scan key to resume system DWORD SCAN_ResumeSystem BOOL Parameters [in] Return Values Return 0 if function succeed; return the system error code that is returned by GetLastError(). The description of system error code can be find in MSDN.. Example //Enable scan key to resume system if(SCAN_ResumeSystem(1) == 0)
  • Page 105: 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 SM_ERROR_SYSTEM, SM_ERROR_API, Example ScannerSetting setting;...
  • Page 106: 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 scan command table. Return Values Return FALSE if the operation is success, ERR_SCANNER_NOT_OPEN if the scanner is not opened.
  • Page 107: Getscannerdevice

    GetScannerDevice Get scanner device type DWORD GetScannerDevice Parameters None Return Values Return FALSE if the scanner device is not ready 1  1D scanner engine 2  2D scan engine Example int nDevice; nDevice = GetScannerDevice(); If(nDevice == 1){ // 1D scanner Else if(nDevice == 2){ // 2D scanner Requirements OS Versions: Windows CE 5.0 and later.
  • Page 108: Scan_Enablepoweronalert

    SCAN_EnablePowerOnAlert Set the scanner light power on alert status DWORD SCAN_EnbalePowerOnAlert nEnable Parameters nEnable [in] TRUE to enable scanner light when scanner power on and False to dable scanner light when scanner power on Return Values If function succeeds, the return value is E_FUNC_SUCCEED. If function fails, possible return value are ERR_SCANNER_NOT_OPEN, E_FUNC_PAR_ERROR, E_SCAN_SETTING_FAIL.
  • Page 109: Scan_Getpoweronalert

    SCAN_GetPowerOnAlert Get scanner power on alert status int SCAN_GetPowerOnAlert Parameters None Return Values Return: FALSE if the scanner power on alert is disable 1 if the scanner power on alert is enable Example If(SCAN_GetPowerOnAlert()){ // Scanner power on alert is enable else){ // Scanner power on alert is disable Requirements...
  • Page 110: Scan_Batchsetting_V1

    SCAN_BatchSetting_V1 Setup scanner in batch command DWORD SCAN_BatchSetting_V1 ScannerSetting_V1 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 SM_ERROR_SYSTEM, SM_ERROR_API, Remark: It can setup more setting than SCAN_BatchSetting() 7-1(Scanning mode), 7-2(Standby duration), 7-12(Stand mode) Example ScannerSetting_V1...
  • Page 111: Scan_Batchread_V1

    SCAN_BatchRead_V1 Read scanner setting in batch command DWORD SCAN_BatcRead_V1 ScannerSetting_V1 *setting Parameters setting [out] The buffer is to receive scanner setting configure. The barcode setting refer scan command table. Return Values Return FALSE if the operation is success, ERR_SCANNER_NOT_OPEN if the scanner is not opened.
  • Page 112: Pt_Openscan2Key

    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 Versions: Windows CE 5.0 and later.
  • Page 113: Pt_Closescan2Key

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

    PT_SetToDefault Reset the scanner setting. All scanner setting will reset to default value. int PT_SetToDefault 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 Versions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll...
  • Page 115: S Canner R Elated F Unctions

    Scanner Related Functions PT_EnableScanner Enable scanner to scan barcode. 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 116: Pt_Disablescanner

    PT_DisableScanner This function will close scanner module. void PT_DisableScanner Parameters None Return Values None. Example PT_DisableScanner(); Requirements OS Versions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PA60 Programming Manual...
  • Page 117: 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 118: 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. pBuffer [out] buffer for storing scanned data.. uiMaxBufferLen [in/out] The max buffer size Return Values Return TRUE if the operation is successful, otherwise return FALSE.
  • Page 119 Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PA60 Programming Manual...
  • Page 120: 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 Versions: Windows CE 5.0 and later. Header: scanapiax.h Link Library: scanapiax.lib Link DLL: scanapiax.dll Device: PA60...
  • Page 121: F Unctions

    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 122: Getlibraryv Ersion

    GetLibraryVersion Get library version number. int GetLibraryVersion Parameters None Return Values The version number. If the return value is 101, it means that dll version is 1.01 Example int nVersion; CString strTemp; nVersion = GetLibraryVersion(); strTemp.Format(_T("Version = %d"), nVersion); AfxMessageBox(strTemp); Requirements OS Versions: Windows CE 5.0 and later.
  • Page 123: 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 124: 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. Remarks This function is meaningful only if scanner is opened.
  • Page 125: 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 126: Scan Command Table

    Scan Command Table Command1 Command2 Value 0: Disable Indication LED indication 1: Enable(*) 0: Disable Buzzer indication 1: Enable(*) 0: Before code data(*) Transmission Code ID position 1: After code data 0: Disable(*) Code ID transmission 1: Proprietary ID 2: AIM ID 0: Disable(*) Code length transmission 1: Enable...
  • Page 127 0x00 ~ 0xff ASCII code(default: Preamble characters NULL) settings 22 characters. 0x00 ~ 0xff ASCII code(default: Postamble characters NULL) settings 22 characters. 0: Disable(*) Code 11 Read 1: Enable 0: Disable Check-sum verification 1: One digit(*) 2: Two digits 0: Disable(*) Check-sum transmission 1: Enable 0 ~ 64(default: 0)
  • Page 128 Code ID setting (default: *) 0: Standard(*) Format 1: Full ASCII 0: Disable(*) Start/stop transmission 1: Enable 0: Disable(*) Code 93 Read 1: Enable 0: Disable Check-sum verification 1: Enable(*) 0: Disable(*) Check-sum transmission 1: Enable 0 ~ 64(default: 0) Max.
  • Page 129 0: Standard(*) Format 1: UCC.EAN 128 0x00 ~ 0xff ASCII code(1 bytes) UCC/EAN 128 ID setting (default: #) 0x00 ~ 0xff ASCII code(1 bytes) Concatenation code (default: 0x1D) 0: Disable(*) Codabar Read 1: Enable 0: Disable(*) Check-sum verification 1: Enable 0: Disable(*) Check-sum transmission 1: Enable...
  • Page 130 0: None(*) Supplement digits 1: 2 digits 2: 5 digits 3: 2, 5 digits 4: UCC/EAN 128 5: 2, UCC/EAN 128 6: 5, UCC/EAN 128 7: All 0: None(*) Truncation/expansion 1: Truncate leading zero 2: Expand to EAN 13 0: Disable(*) Expansion 1: Enable 0: Disable...
  • Page 131 Min. code length 0 ~ 15(default: 0) Truncate leading 0 ~ 15(default: 0) Truncate ending 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting (default: i) 0: Disable Interleaved 2 of 5 Read 1: Enable(*) 0: Disable(*) Check-sum verification 1: Enable 0: Disable(*) Check-sum transmission...
  • Page 132 Code ID setting (default: i) 0: Disable(*) MSI Plessey Read 1: Enable 0: Disable Check-sum verification 1: Mod 10(*) 2: Mod 10/10 3: Mod 11/10 0: Disable(*) Check-sum transmission 1: Enable 0 ~ 64(default: 0) Max. code length 0 ~ 64(default: 0) Min.
  • Page 133 Check-sum verification 1: Enable 0: Disable(*) Check-sum transmission 1: Enable 0 ~ 64(default: 0) Max. code length 0 ~ 64(default: 0) Min. code length 0 ~ 15(default: 0) Truncate leading 0 ~ 15(default: 0) Truncate ending 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting (default: S) 0: Numeric(*)
  • Page 134 0: Disable Check-sum transmission 1: Enable(*) 0 ~ 15(default: 0) Truncate leading 0 ~ 15(default: 0) Truncate ending 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting (default: E) 0: None(*) Supplement digits 1: 2 digits 2: 5 digits 3: 2, 5 digits 4: UCC/EAN 128 5: 2, UCC/EAN 128...
  • Page 135 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting (default: B) 0: Disable PDF-417 Read 1: Enable(*) (2D mode only) 0 ~ 15(default: 0) Truncate leading 0 ~ 15(default: 0) Truncate ending 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting (default: NULL) 0: Disable(*)
  • Page 136 Truncate ending 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting (default: R4) 0: Disable(*) UCC/EAN 128 emulation 1: Enable 0: Disable(*) RSS Limited Read 1: Enable 0 ~ 15(default: 0) Truncate leading 0 ~ 15(default: 0) Truncate ending 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting (default: RL)
  • Page 137 Truncate ending 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting (default: p) 0: Disable(*) Leading “A” 1: Enable 0: Disable(*) MicroPDF Read 1: Enable (2D model only) 0 ~ 15(default: 0) Truncate leading 0 ~ 15(default: 0) Truncate ending 0x00 ~ 0xff ASCII code(1 or 2 bytes) Code ID setting...
  • Page 138: Function Return V Alues

    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...
  • Page 139 BT_ERR_FTP_SERVER_REJECT 0x00001010 FTP server reject connect request BT_ERR_DIVICE_NOT_CONNECT 0x00001011 FTP service device not connect BT_ERR_FTP_DIR_FAIL 0x00001012 Search the direction fail BT_ERR_FTP_EMPTY_FILE 0x00001013 No more file data BT_ERR_CONNECTED 0x00001014 The device had connected // WM_USER 0x0400, WM_APP 0x8000 Programming Manual...

Table of Contents