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.
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.
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 ...
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. ...
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 –...
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;...
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;...
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...
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.
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...
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.
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.
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);...
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"));...
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.
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;...
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";...
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.
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"));...
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.
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.
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...
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;...
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.
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.
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.
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.
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.
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!!"));...
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.
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"));...
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.
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"));...
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.
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"));...
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...
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.
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...
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.
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...
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.
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...
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"));...
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...
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!!"));...
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...
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...
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...
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;...
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;...
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...
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...
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.
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); ....
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...
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.
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...
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.
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.
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.
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.
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.
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.
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.
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.
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..
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;...
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.
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.
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...
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...
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.
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);...
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.
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...
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...
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;...
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...
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"));...
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.
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.
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)
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.
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.
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.
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...
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...
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.
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.
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...
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...
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...
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...
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");...
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...
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...
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.
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.
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!"));...
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.
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!"));...
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...
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...
Need help?
Do you have a question about the PA-60 and is the answer not in the manual?
Questions and answers