Argox PA-60 Owner's manual

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

Programming Manual II
Table of Contents
OVERVIEW............................................................................................................................................................................................................2
SDK FUNCTIONS................................................................................................................................................................................................3
SYSAPIAX.DLL....................................................................................................................................................................................................4
AUDIO RELATED FUNCTIONS..................................................................................................................................................................7
Audio_GetVolume...........................................................................................................................................................7
Audio_SetVolume............................................................................................................................................................8
BATTERY RELATED FUNCTION..............................................................................................................................................................9
GetBatteryStatus...............................................................................................................................................................9
DISPLAY RELATED FUNCTIONS.............................................................................................................................................................11
BacklightOn....................................................................................................................................................................11
Display_QueryBacklightIntensity...............................................................................................................................12
GetBacklightStatus........................................................................................................................................................14
PowerOnLCD...............................................................................................................................................................15
SetBacklightPWM.........................................................................................................................................................16
EnableTouchPanel........................................................................................................................................................17
GetTouchPanelStatus...................................................................................................................................................18
KEYPAD RELATED FUNCTIONS.............................................................................................................................................................19
EnablePowerButton......................................................................................................................................................19
GetKeypadAlphaMode................................................................................................................................................20
SendKbdVisualKey........................................................................................................................................................21
SetKeypadAlphaMode.................................................................................................................................................22
LED RELATED FUNCTIONS...................................................................................................................................................................23
GetKeypadLEDStatus..................................................................................................................................................23
GoodReadLEDOn.......................................................................................................................................................24
KeypadLEDOn..............................................................................................................................................................25
SYSTEM RELATED FUNCTIONS.............................................................................................................................................................26
CallSuspend....................................................................................................................................................................26
EnableAutoConnect......................................................................................................................................................27
RegisterAlphaKeyNotification.....................................................................................................................................28
ShowChineseIME.........................................................................................................................................................29
ShowDesktop..................................................................................................................................................................30
ShowExploreToolbar....................................................................................................................................................31
ShowTaskbar..................................................................................................................................................................32
UnRegisterAlphaKeyNotification...............................................................................................................................33

Programming Manual III
VIBRATOR RELATED FUNCTIONS........................................................................................................................................................34
VibratorOn......................................................................................................................................................................34
WIRELESS RELATED FUNCTION...........................................................................................................................................................35
WL_Enable.....................................................................................................................................................................35
WL_Disable....................................................................................................................................................................36
BLUETOOTH RELATED FUNCTION.......................................................................................................................................................37
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
GetFTPFile.....................................................................................................................................................................72
PutFTPFile.....................................................................................................................................................................73
CreateFTPFolder..........................................................................................................................................................74
DeleteFTPFolder..........................................................................................................................................................75
DeleteFTPFile................................................................................................................................................................76

Programming Manual IV
BLUETOOTH STRUCTURE.......................................................................................................................................................................77
CONNECT_INFO Structure.....................................................................................................................................77
FTP_FILE Structure.....................................................................................................................................................78
SCANAPIAX.DLL..............................................................................................................................................................................................79
API_SCAN RELATED FUNCTIONS.....................................................................................................................................................81
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
SCAN2KEY RELATED FUNCTIONS....................................................................................................................................................108
PT_OpenScan2Key...................................................................................................................................................108
PT_CloseScan2Key...................................................................................................................................................109
PT_SetToDefault.........................................................................................................................................................110
SCANNER RELATED FUNCTIONS........................................................................................................................................................111
PT_EnableScanner.....................................................................................................................................................111
PT_DisableScanner....................................................................................................................................................112
PT_CheckBarcodeData............................................................................................................................................113

Programming Manual V
PT_GetBarcodeData.................................................................................................................................................114
PT_SetDefault..............................................................................................................................................................116
SCAN KEY RELATED FUNCTIONS.....................................................................................................................................................117
EnableTriggerKey.......................................................................................................................................................117
GetLibraryVersion.......................................................................................................................................................118
GetTriggerKeyStatus..................................................................................................................................................119
PressTriggerKey.........................................................................................................................................................120
TriggerKeyStatus........................................................................................................................................................121
SCAN COMMAND TABLE......................................................................................................................................................................122
FUNCTION RETURN VALUES..............................................................................................................................................................134

Programming Manual 2
Overview
The Argox Mobile Computer Software Developer Kit (SDK) Help is intended to assist
programmers with the creation of applications for 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.
The help file is organized into two sections, one is the system related, and the other one is the
value-added scanning functions providing the following information:
Argox Mobile Computer standard Application Programming Interface (API) Definitions
for system related.
Audio
Display
Keypad
Led and Vibrator Indicators
Battery Status
System Settings
Argox Scanning device Application Programming Interface (API) Definitions
API definitions illustrate how to call a given function. The API definitions are structed with some
information including prototypes, parameters, return values, examples and requirements for each
API. The “Requirements” section gives the information on whether or not a device supports a
specific API function and the files to be included.

Programming Manual 3
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.
Example 1: Using LIB file.
At first you should include sysapiax.lib in your project.
#include "Sysapiax.h"
main()
{
. . . . .
SetBacklightPWM(100, 100);
. . . . .
}
Example 2: Using DLL file.
HINSTANCE dllHandle = NULL;
typedef DWORD (_stdcall *pfnSetBacklightPWM)(int nACPowerPercent, int
nBatteryPercent);
pfnSetBacklightPWM m_SetBacklightPWM;
main()
{
dllHandle = LoadLibrary(L"SYSAPIAX.dll");
m_SetBacklightPWM = (pfnSetBacklightPWM) ::GetProcAddress(dllHandle,
_T("SetBacklightPWM"));
m_SetBacklightPWM(0, 0);
FreeLibrary(dllHandle);
}

Programming Manual 4
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
Audio_GetVolume – Query the current volume setting.
Audio_SetVolume – Set the volume setting.
Battery Related Function
GetBatteryStatus – Gets main battery status.
Display Related Functions
BacklightOn – Turn on or off screen backlight.
Display_QueryBacklightIntensity – Query backlight intensity.
GetBacklightStatus – Gets screen backlight status.
PowerOnLCD – Turn on or off LCD power.
SetBacklightPWM – Adjusts screen backlight brightness.
EnableTouchPanel – Enable and disable touch panel.
GetTouchPanelStatus – Query touch panel status
KeyPad Related Functions
EnablePowerButton – Enable and disable power button.
GetAlphaMode – Get the current input mode.
SendKbdVisualKey – Sends a visual key to key buffer.
SetAlphaMode – Change input mode.
LED Related Functions
GetKeypadLEDStatus – Gets keypad LED status.
GoodReadLEDOn – Turn on and off good read LED.
KeypadLEDOn – Turn on or off keypad LED.
System Related Functions
CallSuspend – Enter suspend mode.
EnableAutoConnect – Turn auto-connect on and off.
RegisterAlphaKeyNotification – Register a request with send a message when

Programming Manual 5
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.
UnregisterAlphaKeyNotification – Unregister message request.
Vibrator Related Functions
VibratorOn – On and off vibration indicator.
WLAN Related Functions
WL_Enable – Enable WLAN.
WL_Disable – Disable WLAN.
BlueTooth Related Functions
BT_Enable – Enable Bluetooth Application.
BT_Disable – Disable Bluetooth Application.
BT_On – Enable Bluetooth Function.
BT_Off – Disable Bluetooth Function.
SetDiscoverMode – Enable/Disable the terminal is discoverable.
GetDiscoverMode –Query terminal discoverable status.
SetSPPService – Enable/Disable SPP Service.
GetSPPService –Query SPP Service.
SetFTPService – Enable/Disable FTP service.
GetFTPService – Query FTP service status.
SetFTPWriteable – Enable/Disable FTP service writeable.
GetFTPWriteable – Query FTP service writeable status.
SetFTPShareFolder – Setup the FTP share folder in terminal.
GetFTPShareFolder – Query current FTP share folder in terminal.
InitSearchBTDevice – Initial search information.
FindNextBTDevice – retrieves the results of an Bluetooth device.
EndSearchBTDevice – frees the search handle.
InitSearchFTPDevice – Initial search the device supported FTP service.
FindFirstFTPDevice – Get first device supported FTP service position.
FindNextFTPDevice – Get next device supported FTP service position.
PairDevice – Pair with device.
UnPairDevice – Unpair with device.
GetComInfo – Get com identifier index and amount.

Programming Manual 6
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 – Get next file information from share folder in connected
device.
GetFTPFile – Get file from share folder in the connected device.
PutFTPFile – Send file to share folder in the connected device.
CreateFTPFolder – Create a new folder to share folder in the connected device.
DeleteFTPFolder – Delete folder from share folder in connected device.
DeleteFTPFile – Delete file from share folder in connected device.
Bluetooth Structure
CONNECT_INFO Structure – CONNECT_INFO Information used by
ConnectDevice.
FTP_FILE Structure – FTP_FILE Information used by FindFirstFTPFile and
FindNextFTPFile.

Programming Manual 7
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;
dwResult = Audio_GetVolume(&dwVolume);
if(dwResult != E_FUNC_SUCCEED)
AfxMessageBox(_T("Audio_GetVolume fail"));
else
{
CString strTemp;
strTemp.Format(_T("Volume: %d"),dwVolume);
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 8
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;
dwVolume = 0x11111111;
dwResult = Audio_SetVolume(dwVolume);
if(dwResult != E_FUNC_SUCCEED)
AfxMessageBox(_T("Audio_SetVolume fail"));
Requirements
OS Versions: Windows CE 5.0 and later.
Header: sysapiax.h
Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PA60

Programming Manual 9
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
0 battery high
1 battery low
2 battery critical
3 battery charging
4 no battery
5 battery unknown
Example
switch (GetBatteryStatus())
{
case 0:
AfxMessageBox(_T("Battery High"));
break;
case 1:
AfxMessageBox(_T("Battery Low"));
break;
case 2:
AfxMessageBox(_T("Battery Critical"));
break;
case 3:

Programming Manual 10
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 11
Display Related Functions
BacklightOn
This function will always turn on or off screen backlight.
DWORD BacklightOn
{
BOOL bOn
}
Parameters
bOn
[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.
Remarks
After this function turn on or off backlight, the backlight will always on or off. The
backlight setting of display properties in control panel does not work until terminal
resets.
Example
DWORD dwResult;
dwResult = BacklightOn(TRUE);
if(dwResult != E_FUNC_SUCCEED)
AfxMessageBox(_T("BacklightOn fail"));
Requirements
OS Versions: Windows CE 5.0 and later.
Header: sysapiax.h
Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PA60

Programming Manual 12
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.
Remarks
The parameters will be one of the values in the following table.
Backlight
intensity
Backlight
brightness
4 super
3 normal
2 fine
1 micro
0 off

Programming Manual 13
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 14
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"));
else
AfxMessageBox(_T("Backlight 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 15
PowerOnLCD
This function turns on or off LCD power.
DWORD PowerOnLCD
{
BOOL bOn
}
Parameters
bOn
[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.
Remarks
After calling this function with bOn is FALSE, terminal will only turn off LCD power.
It means that terminal still works. You should call this function to turn on LCD power
or reset terminal.
Example
DWORD dwResult;
dwResult = PowerOnLCD(FALSE); //power off LCD
if(dwResult != E_FUNC_SUCCEED)
AfxMessageBox(_T("PowerOnLCD fail"));
Sleep(3000);
dwResult = PowerOnLCD(TRUE); //power on LCD
if(dwResult != E_FUNC_SUCCEED)
AfxMessageBox(_T("PowerOnLCD fail"));
Requirements
OS Versions: Windows CE 5.0 and later.
Header: sysapiax.h
Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PA60

Programming Manual 16
SetBacklightPWM
This function adjusts screen backlight brightness.
DWORD SetBacklightPWM
{
int nACPowerPercent,
int nBatteryPercent
}
Parameters
nACPowerPercent,nBatteryPercent
[in] One is brightness setting using AC power and the other is brightness setting
using battery. These two members must be one of the values in the following
table.
nPercent Backlight brightness
100 super
75 normal
50 fine
25 micro
0 off
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.
Remarks
The Backlight Setting program in Control Panel sets screen backlight brightness.
Called this function will also change the brightness in Backlight Setting. You can use
this function or Backlight Setting program in Control Panel to adjust backlight
brightness.
Example
DWORD dwResult = SetBacklightPWM(100,100);
if(dwResult != E_FUNC_SUCCEED)
AfxMessageBox(_T("SetBacklightPWM fail"));
Requirements
OS Versions: Windows CE 5.0 and later.
Header: sysapiax.h
Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PA60
Other manuals for PA-60
1
Table of contents
Other Argox Handheld manuals