Argox PT-80 Manuel du propriétaire

PT-80 Mobile Computer
Programming Manual
DOC NO. UM-PT805-02
Aug. 2007
Version 1.0

Programming Manual II
Table of Contents
OVERVIEW....................................................................................................................................................................................................................................1
SDKFUNCTIONS......................................................................................................................................................................................................................2
SYSAPIAX.DLL............................................................................................................................................................................................................................3
AUDIORELATEDFUNCTIONS......................................................................................................................................................................................5
Audio_GetVolume..............................................................................................................................................................................5
Audio_SetVolume...............................................................................................................................................................................6
BATTERYRELATEDFUNCTION...................................................................................................................................................................................7
GetBatteryStatus..................................................................................................................................................................................7
DISPLAYRELATEDFUNCTIONS..................................................................................................................................................................................9
BacklightOn..........................................................................................................................................................................................9
Display_QueryBacklightIntensity.............................................................................................................................................10
GetBacklightStatus..........................................................................................................................................................................12
PowerOnLCD..................................................................................................................................................................................13
SetBacklightPWM...........................................................................................................................................................................14
KEYPADRELATEDFUNCTIONS...............................................................................................................................................................................15
EnablePowerButton.......................................................................................................................................................................15
GetKeypadAlphaMode................................................................................................................................................................16
SendKbdVisualKey.........................................................................................................................................................................17
SetKeypadAlphaMode..................................................................................................................................................................18
LEDRELATEDFUNCTIONS.......................................................................................................................................................................................19
GetKeypadLEDStatus...................................................................................................................................................................19
GoodReadLEDOn.........................................................................................................................................................................20
KeypadLEDOn................................................................................................................................................................................21
SYSTEMRELATEDFUNCTIONS................................................................................................................................................................................22
CallSuspend.......................................................................................................................................................................................22
EnableAutoConnect.......................................................................................................................................................................23
RegisterAlphaKeyNotification....................................................................................................................................................23
ShowChineseIME...........................................................................................................................................................................25
ShowDesktop....................................................................................................................................................................................26
ShowExploreToolbar.....................................................................................................................................................................27
ShowTaskbar.....................................................................................................................................................................................28
UnRegisterAlphaKeyNotification.............................................................................................................................................29

SCANAPIAX.DLL...................................................................................................................................................................................................................30
API_SCANRELATEDFUNCTIONS.......................................................................................................................................................................32
API_Register......................................................................................................................................................................................32
API_Unregister................................................................................................................................................................................33
API_GetBarData............................................................................................................................................................................34
API_GetBarDataLength..............................................................................................................................................................36
API_GetBarType.............................................................................................................................................................................37
API_GetError...................................................................................................................................................................................38
API_GetSysError............................................................................................................................................................................39
API_GoodRead...............................................................................................................................................................................40
API_LoadSettingsFromFile........................................................................................................................................................41
API_Reset...........................................................................................................................................................................................41
API_ResetBarData.........................................................................................................................................................................43
API_SaveSettingsToFile................................................................................................................................................................44
API_SaveSettingsToScanner......................................................................................................................................................45
S2K_IsLoad.......................................................................................................................................................................................46
S2K_Load...........................................................................................................................................................................................47
SCAN_QueryStatus........................................................................................................................................................................48
SCAN_SendCommand................................................................................................................................................................49
SCAN2KEYRELATEDFUNCTIONS.........................................................................................................................................................................50
PT_OpenScan2Key.......................................................................................................................................................................50
PT_CloseScan2Key.......................................................................................................................................................................51
PT_SetToDefault..............................................................................................................................................................................52
SCANNERRELATEDFUNCTIONS.............................................................................................................................................................................53
PT_EnableScanner........................................................................................................................................................................53
PT_DisableScanner.......................................................................................................................................................................54
PT_CheckBarcodeData...............................................................................................................................................................55
PT_GetBarcodeData....................................................................................................................................................................56
PT_SetDefault...................................................................................................................................................................................58
SCANKEYRELATEDFUNCTIONS...........................................................................................................................................................................59
EnableTriggerKey...........................................................................................................................................................................59
GetLibraryVersion...........................................................................................................................................................................60
GetTriggerKeyStatus......................................................................................................................................................................61
PressTriggerKey...............................................................................................................................................................................62
TriggerKeyStatus..............................................................................................................................................................................63
SCANCOMMANDTABLE.............................................................................................................................................................................................64
FUNCTIONRETURNVALUES...................................................................................................................................................................................73
Programming Manual III

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 CE4.2 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 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 1

SDKFunctions
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 2

SYSAPIAX.DLL
In this SDK, we supply SYSAPIAX.DLL which includes 18 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
zAudio_GetVolume – Query the current volume setting.
zAudio_SetVolume – Set the volume setting.
Battery Related Function
zGetBatteryStatus – Gets main battery status.
Display Related Functions
zBacklightOn – Turn on or off screen backlight.
zDisplay_QueryBacklightIntensity – Query backlight intensity.
zGetBacklightStatus – Gets screen backlight status.
zPowerOnLCD – Turn on or off LCD power.
zSetBacklightPWM – Adjusts screen backlight brightness.
KeyPad Related Functions
zEnablePowerButton – Enable and disable power button.
zGetAlphaMode – Get the current input mode.
zSendKbdVisualKey – Sends a visual key to key buffer.
zSetAlphaMode – Change input mode.
LED Related Functions
zGetKeypadLEDStatus – Gets keypad LED status.
zGoodReadLEDOn – Turn on and off good read LED.
zKeypadLEDOn – Turn on or off keypad LED.
System Related Functions
zCallSuspend – Enter suspend mode.
zEnableAutoConnect – Turn auto-connect on and off.
zRegisterAlphaKeyNotification – Register a request with send a message when
the alpha key pressed.
zShowChineseIME – Display and hide the Chinese IME.
Programming Manual 3

zShowDeskTop – Display and hide all icons on desktop.
zShowExploreToolbar – Display and hide toolbar on windows explorer.
zShowTaskbar – Display and hide taskbar.
zUnregisterAlphaKeyNotification – Unregister message request.
Programming Manual 4

AudioRelatedFunctions
Audio_GetVolume
Thisfunctionqueriesthecurrentvolumesetting.
DWORDAudio_GetVolume
{
LPDWORDlpdwVolume
}
Parameters
lpdwVolume
[out]Thecurrentvolumesetting.
ReturnValues
Iffunctionsucceeds,thereturnvalueisE_FUNC_SUCCEED.Iffunctionfails,thereturnvalueis
E_FUNC_ERROR.
Example
DWORDdwResult,dwVolume;
dwResult=Audio_GetVolume(&dwVolume);
if(dwResult!=E_FUNC_SUCCEED)
AfxMessageBox(_T("Audio_GetVolumefail"));
else
{
CStringstrTemp;
strTemp.Format(_T("Volume: %d"),dwVolume);
AfxMessageBox(strTemp);
}
Requirements
OSVersions:WindowsCE4.2andlater.
Header:sysapiax.h
LinkLibrary:sysapiax.lib
LinkDLL:sysapiax.dll
Device:PT80
Programming Manual 5

Audio_SetVolume
Thisfunctionsetsthecurrentvolumesetting.
DWORDAudio_SetVolume
{
DWORDdwVolume
}
Parameters
dwVolume
[in]Specifiesanewvolumesetting.Thedefaultsettingis0x99999999.
ReturnValues
Iffunctionsucceeds,thereturnvalueisE_FUNC_SUCCEED.Iffunctionfails,thereturnvalueis
E_FUNC_ERROR.
Example
DWORDdwResult,dwVolume;
dwVolume=0x11111111;
dwResult=Audio_SetVolume(dwVolume);
if(dwResult!=E_FUNC_SUCCEED)
AfxMessageBox(_T("Audio_SetVolumefail"));
Requirements
OSVersions:WindowsCE4.2andlater.
Header:sysapiax.h
LinkLibrary:sysapiax.lib
LinkDLL:sysapiax.dll
Device:PT80
Programming Manual 6

BatteryRelatedFunction
GetBatteryStatus
Thisfunctiongetsmainbatterystatus.
intGetBatteryStatus
{
}
Parameters
None.
ReturnValues
Thereturnvaluecanbeoneofthevaluesinthefollowingtable.
Returnvalue Description
0 batteryhigh
1 batterylow
2 batterycritical
3 batterycharging
4 nobattery
5 batteryunknown
Example
switch(GetBatteryStatus())
{
case0:
AfxMessageBox(_T("BatteryHigh"));
break;
case1:
AfxMessageBox(_T("BatteryLow"));
break;
case2:
AfxMessageBox(_T("BatteryCritical"));
break;
case3:
AfxMessageBox(_T("BatteryCharging"));
Programming Manual 7
Autres manuels pour PT-80
2
Table des matières
Autres manuels Argox portable

Argox
Argox PT-9230 Manuel du propriétaire

Argox
Argox PT-60 Manuel utilisateur

Argox
Argox PT-9130 Manuel du propriétaire

Argox
Argox PA-60 Manuel utilisateur

Argox
Argox PT-80 Manuel utilisateur

Argox
Argox PA-60 Manuel du propriétaire

Argox
Argox PT-60 Manuel utilisateur

Argox
Argox PT-90 Manuel utilisateur

Argox
Argox PT-80 Manuel utilisateur

Argox
Argox PT-90 Manuel utilisateur


















