Argox PT-9130 User Manual

PT-9130 Mobile Computer SDK Programming Manual
DOC NO. UM-PT905-01
Sep. 2012
© 2010-2012 ARGOX Information Co., Ltd.
http://www .argox.com
Table of Contents
OVERVIEW ............................................................................................................................................................................................................................ 2
SDK FUNCTIONS............................................................................................................................................................................................................... 3
SYSAPIAX.DLL .................................................................................................................................................................................................................... 4
AUDIO RELATED FUNCTIONS ............................................................................................................................................................................... 9
Audio_GetVolume ........................................................................................................................................................................ 9
Audio_SetVolume ...................................................................................................................................................................... 10
BATTERY RELATED FUNCTION.......................................................................................................................................................................... 11
GetBatteryStatus ......................................................................................................................................................................... 11
DISPLAY RELATED FUNCTIONS ......................................................................................................................................................................... 13
BacklightOn ................................................................................................................................................................................ 13
Display_QueryBacklightIntensity ........................................................................................................................................ 14
GetBacklightStatus .................................................................................................................................................................... 16
PowerOnLCD ........................................................................................................................................................................... 17
SetBacklightPWM .................................................................................................................................................................... 18
EnableTouchPanel ................................................................................................................................................................... 19
GetTouchPanelStatus ............................................................................................................................................................... 20
KEYPAD RELATED FUNCTIONS ........................................................................................................................................................................ 21
EnablePowerButton................................................................................................................................................................. 21
GetKeypadAlphaMode .......................................................................................................................................................... 22
SendKbdVirtualKey .................................................................................................................................................................. 23
SetKeypadAlphaMode ............................................................................................................................................................ 24
LED RELATED FUNCTIONS ................................................................................................................................................................................ 25
GetKeypadLEDStatus ............................................................................................................................................................. 25
GoodReadLEDOn ................................................................................................................................................................... 26
KeypadLEDOn ......................................................................................................................................................................... 27
QueryKeypadLEDIntensity................................................................................................................................................... 28
SetKeypadPWM ....................................................................................................................................................................... 30
SYSTEM RELATED FUNCTIONS ......................................................................................................................................................................... 31
CallSuspend ................................................................................................................................................................................ 31
EnableAutoConnect ................................................................................................................................................................. 32
RegisterAlphaKeyNotification .............................................................................................................................................. 33
ShowChineseIME ..................................................................................................................................................................... 34
ShowDesktop .............................................................................................................................................................................. 35
ShowExploreToolbar ............................................................................................................................................................... 36
ShowTaskbar .............................................................................................................................................................................. 37
PT-90 Mobile Computer SDK Programming Manual II
UnRegisterAlphaKeyNotification ........................................................................................................................................ 38
RegisterTriggerKeyNotification ............................................................................................................................................ 39
UnregisterTriggerKeyNotification ....................................................................................................................................... 40
VIBRATOR RELATED FUNCTIONS ..................................................................................................................................................................... 41
VibratorOn ................................................................................................................................................................................... 41
WLAN RELATED FUNCTION ............................................................................................................................................................................ 42
WL_Enable ................................................................................................................................................................................. 42
WL_Disable ................................................................................................................................................................................ 43
BLUETOOTH RELATED FUNCTION ................................................................................................................................................................... 44
BT_On .......................................................................................................................................................................................... 44
BT_Off ........................................................................................................................................................................................... 45
SetDiscoverMode ...................................................................................................................................................................... 46
GetDiscoverMode .................................................................................................................................................................... 47
SetSPPService ............................................................................................................................................................................ 48
GetSPPService ........................................................................................................................................................................... 49
SetFTPService ............................................................................................................................................................................ 50
GetFTPService .......................................................................................................................................................................... 51
SetFTPWriteable ....................................................................................................................................................................... 52
GetFTPWriteable ...................................................................................................................................................................... 53
SetFTPShareFolder ................................................................................................................................................................. 54
GetFTPShareFolder ................................................................................................................................................................ 55
InitSearchBTDevice ................................................................................................................................................................. 56
FindNextBTDevice ................................................................................................................................................................... 57
EndSearchBTDevice ............................................................................................................................................................... 59
InitSearchFTPDevice .............................................................................................................................................................. 60
FindFirstFTPDevice ............................................................................................................................................................... 61
FindNextFTPDevice ............................................................................................................................................................... 63
PairDevice ................................................................................................................................................................................... 65
UnPairDevice ............................................................................................................................................................................ 66
GetComInfo ................................................................................................................................................................................ 67
ConnectDevice ........................................................................................................................................................................... 69
GetConnectStatus ...................................................................................................................................................................... 70
GetSPPClientChannel ............................................................................................................................................................ 71
FindFirstFTPFile...................................................................................................................................................................... 72
FindNextFTPFile ...................................................................................................................................................................... 73
GetFTPFile ................................................................................................................................................................................. 74
PutFTPFile ................................................................................................................................................................................. 75
CreateFTPFolder ..................................................................................................................................................................... 76
DeleteFTPFolder ...................................................................................................................................................................... 77
PT-90 Mobile Computer SDK Programming Manual III
DeleteFTPFile............................................................................................................................................................................ 78
CAMERA RELATED FUNCTION .......................................................................................................................................................................... 79
Camera_On ................................................................................................................................................................................ 79
Camera_Off ................................................................................................................................................................................ 80
SetPreviewSize ............................................................................................................................................................................ 81
GetPreviewSize .......................................................................................................................................................................... 82
EnablePreview ........................................................................................................................................................................... 83
SetStillCaptureSize ..................................................................................................................................................................... 84
GetStillCaptureSize ................................................................................................................................................................... 85
StartStillCapture ......................................................................................................................................................................... 86
SetFlash ........................................................................................................................................................................................ 87
GetFlash ....................................................................................................................................................................................... 88
SetDarkMode ............................................................................................................................................................................. 89
GetDarkMode ............................................................................................................................................................................ 90
SetInvert ........................................................................................................................................................................................ 91
GetInvert ....................................................................................................................................................................................... 92
GPRS RELATED FUNCTION ............................................................................................................................................................................... 93
GPRS_On ................................................................................................................................................................................... 93
GPRS_Off .................................................................................................................................................................................... 94
GetGPRSPowerStatus ............................................................................................................................................................ 95
SendATCommand .................................................................................................................................................................... 96
GetATResponse ......................................................................................................................................................................... 97
GetIMEINumber....................................................................................................................................................................... 98
GetIMSINumber ....................................................................................................................................................................... 99
GetModuleInfo ......................................................................................................................................................................... 100
GetSignalQuality ..................................................................................................................................................................... 101
ConnectRAS .............................................................................................................................................................................. 102
DisconnectRAS ........................................................................................................................................................................ 103
GetRASConnStatus ................................................................................................................................................................ 104
CreateRASEntry ...................................................................................................................................................................... 105
DeleteRASEntry ....................................................................................................................................................................... 106
ChangeRASEntryName ....................................................................................................................................................... 107
ChangeRASEntryProperty .................................................................................................................................................. 108
GetRASEntryProperty ........................................................................................................................................................... 109
GetRASEntryCount ................................................................................................................................................................ 110
MenuRASEntries ..................................................................................................................................................................... 111
GetPINCounter ....................................................................................................................................................................... 112
GetPINStatus ............................................................................................................................................................................ 113
SetPINLock ............................................................................................................................................................................... 114
PT-90 Mobile Computer SDK Programming Manual IV
GetPINLockStatus .................................................................................................................................................................. 115
CheckPINCode ....................................................................................................................................................................... 116
CheckPUKCode ..................................................................................................................................................................... 117
ChangePINCode .................................................................................................................................................................... 118
ReadPhonebook ...................................................................................................................................................................... 119
WritePhonebook ...................................................................................................................................................................... 120
DeletePhonebook .................................................................................................................................................................... 121
ReadMultiPhonebook ........................................................................................................................................................... 122
GetPhonebookTotal ............................................................................................................................................................... 124
GetPhoneMaxLength ............................................................................................................................................................ 125
SendSMS .................................................................................................................................................................................... 126
ReadSMS ................................................................................................................................................................................... 127
DeleteSMS ................................................................................................................................................................................. 129
ReadMultiSMS ........................................................................................................................................................................ 130
WriteStorageSMS .................................................................................................................................................................... 132
SendStorageSMS ..................................................................................................................................................................... 133
GetSMSTotal ............................................................................................................................................................................. 134
SetSMSCentre........................................................................................................................................................................... 135
GetSMSCentre ......................................................................................................................................................................... 136
SMS_Register ........................................................................................................................................................................... 137
SMS_UnRegister .................................................................................................................................................................... 138
GPS ........................................................................................................................................................................................................................... 139
BLUETOOTH STRUCTURE ................................................................................................................................................................................. 140
CONNECT_INFO Structure ............................................................................................................................................. 140
FTP_FILE Structure .............................................................................................................................................................. 141
GPRS STRUCTURE ............................................................................................................................................................................................. 142
RAS_ENTRY Structure .......................................................................................................................................................... 142
PHONEBOOK_INFO Structure ..................................................................................................................................... 144
SMS_INFO Structure ............................................................................................................................................................ 145
RFID.DLL ............................................................................................................................................................................................................................ 146
RFID RELATED FUNCTION .............................................................................................................................................................................. 148
OpenComPort ......................................................................................................................................................................... 148
CloseComPort ......................................................................................................................................................................... 149
GetFWVersion.......................................................................................................................................................................... 150
APIVersion ................................................................................................................................................................................. 151
SetWorkingType ....................................................................................................................................................................... 152
AntennaContro ......................................................................................................................................................................... 153
Inventory15693 ........................................................................................................................................................................ 154
PT-90 Mobile Computer SDK Programming Manual V
ReadSingleBlock ..................................................................................................................................................................... 155
WriteSingleBlock ..................................................................................................................................................................... 156
WriteAFI ..................................................................................................................................................................................... 157
WriteDSFID .............................................................................................................................................................................. 158
LockAFI ...................................................................................................................................................................................... 159
LockDSFID .............................................................................................................................................................................. 160
LockBlock .................................................................................................................................................................................. 161
TagSystemInfo .......................................................................................................................................................................... 162
TagStayQuiet ............................................................................................................................................................................. 163
TagSelect ..................................................................................................................................................................................... 164
TagResetToReady .................................................................................................................................................................... 165
OpenCard14443A .................................................................................................................................................................. 166
ReadMifareBlock .................................................................................................................................................................... 167
WriteMifareBlock .................................................................................................................................................................... 168
ReadUltraLightBlock ............................................................................................................................................................. 169
WriteUltraLightBlock............................................................................................................................................................. 170
GetUid14443B ........................................................................................................................................................................ 171
SRIX4KChipID ....................................................................................................................................................................... 172
SRIX4KReadBlock ................................................................................................................................................................. 173
SRIX4KWriteBlock ................................................................................................................................................................. 174
RFID REQUEST FLAGS ...................................................................................................................................................................................... 175
SRIX4K FLOW CHART ..................................................................................................................................................................................... 176
SCANAPIAX.DLL.......................................................................................................................................................................................................... 177
API_SCAN RELATED FUNCTIONS ............................................................................................................................................................... 180
API_Register ............................................................................................................................................................................. 180
API_Unregister ........................................................................................................................................................................ 181
API_GetBarData .................................................................................................................................................................... 182
API_GetBarDataLength ...................................................................................................................................................... 184
API_GetBarType..................................................................................................................................................................... 185
API_GetError........................................................................................................................................................................... 186
API_GetSysError .................................................................................................................................................................... 187
API_GoodRead ....................................................................................................................................................................... 188
API_LoadSettingsFromFile ................................................................................................................................................ 189
API_Reset .................................................................................................................................................................................. 190
API_ResetBarData ................................................................................................................................................................ 191
API_SaveSettingsToFile ........................................................................................................................................................ 192
API_SaveSettingsToScanner ............................................................................................................................................... 193
S2K_IsLoad .............................................................................................................................................................................. 194
PT-90 Mobile Computer SDK Programming Manual VI
S2K_Load .................................................................................................................................................................................. 195
SCAN_QueryStatus................................................................................................................................................................ 196
SCAN_SendCommand ........................................................................................................................................................ 197
SCAN_ResumeSystem .......................................................................................................................................................... 198
SCAN_BatchSetting ............................................................................................................................................................... 199
SCAN_BatchRead .................................................................................................................................................................. 200
SCAN2KEY RELATED FUNCTIONS................................................................................................................................................................. 201
PT_OpenScan2Key ............................................................................................................................................................... 201
PT_CloseScan2Key ............................................................................................................................................................... 202
PT_SetToDefault ..................................................................................................................................................................... 203
SCANNER RELATED FUNCTIONS .................................................................................................................................................................... 204
PT_EnableScanner ................................................................................................................................................................ 204
PT_DisableScanner ............................................................................................................................................................... 205
PT_CheckBarcodeData ....................................................................................................................................................... 206
PT_GetBarcodeData ............................................................................................................................................................ 207
PT_SetDefault .......................................................................................................................................................................... 209
SCAN KEY RELATED FUNCTIONS .................................................................................................................................................................. 210
EnableTriggerKey................................................................................................................................................................... 210
GetLibraryVersion .................................................................................................................................................................. 211
GetTriggerKeyStatus .............................................................................................................................................................. 212
PressTriggerKey ...................................................................................................................................................................... 213
TriggerStatus ............................................................................................................................................................................. 214
SCAN STRUCTURE ............................................................................................................................................................................................... 215
ScannerSetting Structure ....................................................................................................................................................... 215
GeneralSetting Structure ....................................................................................................................................................... 218
Code11_Setting Structure...................................................................................................................................................... 219
Code39_Setting Structure ..................................................................................................................................................... 220
Code93_Setting Structure ..................................................................................................................................................... 221
Code128_Setting Structure .................................................................................................................................................. 222
Codabar_Setting Structure ................................................................................................................................................... 223
EAN8_Setting Structure ........................................................................................................................................................ 224
EAN13_Setting Structure ...................................................................................................................................................... 225
Industrial25_Setting Structure ............................................................................................................................................. 226
Interleaved25_Setting Structure .......................................................................................................................................... 227
MSI_Setting Structure ............................................................................................................................................................ 228
UK_Setting Structure.............................................................................................................................................................. 229
Telepen_Setting Structure ...................................................................................................................................................... 230
UPCA_Setting Structure ....................................................................................................................................................... 231
UPCE_Setting Structure ....................................................................................................................................................... 232
PT-90 Mobile Computer SDK Programming Manual VII
Matrix25_Setting Structure .................................................................................................................................................. 233
UEGeneral_Setting Structure ............................................................................................................................................. 234
IATA25_Setting Structure ...................................................................................................................................................... 235
Trioptic_Setting Structure ...................................................................................................................................................... 236
RSS_Setting Structure ............................................................................................................................................................. 237
SCAN COMMAND TABLE .................................................................................................................................................................................... 238
FUNCTION RETURN VALUES .......................................................................................................................................................................... 246
PT-90 Mobile Computer SDK Programming Manual VIII
Overview
The Argox PT-90 Mobile Computer Software Developer Kit (SDK) Programming Manual is prepared to assist programmers on developing application programs using Argox PT-90 Mobile Computers under Microsoft® Windows® CE6.0 Operating System. It gives all the details needed to call functional subroutines controling the devices on the Argox PT-90 Mobile Computer or access value-added devices on board such as Scanning and Wireless module.
This Programming Manual is organized as two major sections, one for the system related functions and the other for value-added scanning functions with the following information:
Argox Mobile Computer standard Application Programming Interface (API) Definitions
for system related functions:
Audio Display Keypad Led and Vibrator Indicators Battery Status System Settings Bluetooth WLAN
Argox Scanning module Application Programming Interface (API) Definitions
API definitions illustrate how to call a given functional subroutine. The API definitions are structed with information including: prototypes, parameters, return values, examples, and requirements of each API. The “Requirements” section gives information on whether or not a device supports a specific API function and the files to be included.
PT-90 Mobile Computer SDK Programming Manual 2
SDK Functions
When using SDK to develop their own application program, the programmer should link DLL file or LIB file, then, include header file SYSAPIAX.H. The following two examples are given to show how to use LIB file and DLL file while developing an application program. We will use Visual Studio 2005 to illustrate.
Example 1: Using LIB file.
First, programmer should include sysapiax.lib in the application 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);
}
PT-90 Mobile Computer SDK Programming Manual 3
SYSAPIAX.DLL
In PT-90 SDK, we provide SYSAPIAX.DLL which includes several functions to allow programmer to control device drivers and system functions. Programmer can use WINCE develop tool like Visual Studio 2005 to develop application programs. Descriptions of all these functions are given below.
Audio Related Functions
Audio_GetVolume – Query current volume setting. Audio_SetVolume – Set level of audio volume.
Battery Related Function
GetBatteryStatus – Gets main battery status.
Display Related Functions
BacklightOn Turn ON or OFF screen backlight. Display_QueryBacklightIntensity – Query back-light intensity. GetBacklightStatus Gets screen backlight status. PowerOnLCD Turn ON or OFF the power of LCD. SetBacklightPWM Adjusts screen back-light brightness. EnableTouchPanel – ENABLE or DISABLE touch panel. GetTouchPanelStatus – Get touch panel status.
KeyPad Related Functions
EnablePowerButton – ENABLE or DISABLE Power button. GetAlphaMode Get the current keypad input MODE. SendKbdVisualKey Sends a virtual key to key buffer. SetAlphaMode Change keypad input MODE.
LED Related Functions
GetKeypadLEDStatus Gets keypad backlight LED status. GoodReadLEDOn Turn ON or OFF good read LED. KeypadLEDOn Turn ON or OFF keypad backlight LED. QueryKeypadLEDIntensity – Query keypad backlight LED brightness. SetKeypadPWM – Adjusts keypad backlight LED brightness.
PT-90 Mobile Computer SDK Programming Manual 4
System Related Functions
CallSuspend – Enter SUSPEND mode. EnableAutoConnect – Turn auto-connect ON or OFF. RegisterAlphaKeyNotification – Register a request to send a prompt message
when the ALPHA key is pressed.
ShowChineseIME – DISPLAY or HIDE the Chinese IME. ShowDeskTop – DISPLAY or HIDE all icons on desktop. ShowExploreToolbar – DISPLAY or HIDE toolbar on windows explorer. ShowTaskbar –DISPLAY or HIDE taskbar. UnregisterAlphaKeyNotification – UNREGISTER prompt message request. RegisterTriggerKeyNotification – Register a request to send a prompt message
when the trigger key is pressed.
UnregisterTriggerKeyNotification – UNREGISTER prompt message request for
trigger key.
Vibrator Related Functions
VibratorOn – ON or OFF vibration indicator.
WLAN Related Functions
WL_Enable – Enable WLAN. WL_Disable – Disable WLAN.
BlueTooth Related Functions
BT_On – Enable Bluetooth. BT_Off – Disable Bluetooth. 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.
PT-90 Mobile Computer SDK Programming Manual 5
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. 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.
Camera Related Functions
Camera_On – Enable Camera. Camera_Off – Disable Camera. SetPreviewSize – Set preview window x-axis coordinatey-axis coordinate
widthheight.
GetPreviewSize – Get preview window x-axis coordinatey-axis coordinate
widthheight.
EnablePreview – Enable/Disable preview window. SetStillCaptureSize – Set still capture image pixel. GetStillCaptureSize – Get still capture image pixel. StartStillCapture – Start execute still capture active. SetFlash – Enable/Disable flash light. GetFlash – Query flash light status. SetDarkMode – Enable/Disable dark mode. GetDarkMode – Query dark mode status. SetInvert – Set media stream invert, include flipmirror. GetInvert – Get media stream invert, include flipmirror.
PT-90 Mobile Computer SDK Programming Manual 6
GPRS Related Functions
GPRS_On – Enable GPRS. GPRS_Off – Disable GPRS. GetGPRSPowerStatus – Query GPRS current power status. SendATCommand – Send AT command and verify required response. GetATResponse – Get response from module buffer. GetIMEINumber – Query IMEI number. GetIMSINumber – Query IMSI number. GetModuleInfo – Query module information. GetSignalQuality – Query signal strength of GSM/GPRS network. ConnectRAS – Establishes a RAS connection. DisconnectRAS – Disconnect current RAS connection. GetRASConnStatus – Query RAS connection status. CreateRASEntry – Create a new RAS entry. DeleteRASEntry – Delete a RAS entry. ChangeRASEntryName – Change RAS entry name. ChangeRASEntryProperty – Change RAS entry property. GetRASEntryProperty – Query RAS entry property. GetRASEntryCount – Query RAS entry count. MenuRASEntries – Menu all RAS entries, and get specified entry name. GetPINCounter – Query still available count for entering the currently required
password.
GetPINStatus – Query current authentication code status. SetPINLock – Set PIN code lock or unlock. GetPINLockStatus – Query the PIN code lock status. CheckPINCode – Enter PIN code passwords, and check correctness. CheckPUKCode – Enter PUK code passwords, and check correctness. ChangePINCode – Allows defining new PIN code password. ReadPhonebook – Read a phonebook entry. WritePhonebook – Write a phonebook entry. DeletePhonebook – Delete a phonebook entry. ReadMultiPhonebook – Read multitude phonebook entries. GetPhonebookTotal – Query phonebook entry amount, include usedtotal. GetPhoneMaxLength – Query maximum length of number field and text field. SendSMS – Send a SMS message. ReadSMS – Read a SMS message. DeleteSMS – Delete a SMS message.
PT-90 Mobile Computer SDK Programming Manual 7
ReadMultiSMS – Read multitude SMS messages. WriteStorageSMS – Write a SMS message to memory storage. SendStorageSMS – Send a SMS message from memory storage. GetSMSTotal – Query SMS message amount, include usedtotal. SetSMSCentre – Set phone number of SMS centre. GetSMSCentre – Get phone number of SMS centre. SMS_Register – Register the application to SYSAPIAX.dll. SMS_UnRegister – Un-register the application from SYSAPIAX.dll.
Bluetooth Structure
CONNECT_INFO Structure – CONNECT_INFO Information used by
FTP_FILE Structure – FTP_FILE Information used by FindFirstFTPFile and
ConnectDevice.
FindNextFTPFile.
GPRS Structure
RAS_ENTRY Structure – RAS_ENTRY Information used by CreateRASEntry
ChangeRASEntryProperty and GetRASEntryProperty.
PHONEBOOK_INFO Structure – PHONEBOOK_INFO Information used by
ReadMultiPhonebook.
SMS_INFO Structure – SMS_INFO Information used by ReadMultiSMS.
PT-90 Mobile Computer SDK Programming Manual 8
DWORD Audio_GetVolume { LPDWORD lpdwVolume }
Audio Related Functions
Audio_GetVolume
To query the current audio volume level setting.
Parameters
lpdwVolume
[out] The current volume level setting.
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, the returned value is
E_FUNC_ERROR.
Example
else { CString strTemp;
AfxMessageBox(strTemp); }
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
DWORD dwResult, dwVolume; dwResult = Audio_GetVolume(&dwVolume); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("Audio_GetVolume fail"));
strTemp.Format(_T("Volume: %d"),dwVolume);
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 9
DWORD Audio_SetVolume { DWORD dwVolume }
Audio_SetVolume
To set the audio volume level.
Parameters
dwVolume
[in] Specifies a new volume level setting. The default level is 0x99999999.
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, the returned value is
E_FUNC_ERROR.
Example
OS Versions: Windows CE 6.0 or beyond Header: sysapiax.h Link Library: sysapiax.lib
DWORD dwResult,dwVolume; dwVolume = 0x11111111; dwResult = Audio_SetVolume(dwVolume); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("Audio_SetVolume fail"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 10
int GetBatteryStatus { }
Return value
Description
0
battery high
1
battery low
2
battery critical
3
battery charging
4
no battery
5
battery unknown
Battery Related Function
GetBatteryStatus
To get main battery status.
Parameters
None.
Returned Values
The returned value can be one of the values in the table below.
Example
switch (GetBatteryStatus()) { case 0: AfxMessageBox(_T("Battery High")); break; case 1: AfxMessageBox(_T("Battery Low")); break; case 2: AfxMessageBox(_T("Battery Critical")); break;
PT-90 Mobile Computer SDK Programming Manual 11
case 3: AfxMessageBox(_T("Battery Charging")); break; case 4: AfxMessageBox(_T("No Battery")); break; case 5: AfxMessageBox(_T("Battery Unknown")); break; }
Requirements
OS Versions: Windows CE 6.0 or beyond Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 12
DWORD BacklightOn { BOOL bOn }
Display Related Functions
BacklightOn
To turn ON or OFF the LCD screen back-light.
Parameters
bOn
[in] Flag that indicates whether to turn ON screen back-light(TRUE) or turn OFF screen back-light(FALSE).
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, the returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Remarks
After this action turning ON or OFF the screen back-light, the back-light will be always ON or OFF. The back-light
setting of display properties in control panel does not work until the terminal been reseted.
Example
OS Versions: Windows CE 6.0 or beyond.
DWORD dwResult; dwResult = BacklightOn(TRUE); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("BacklightOn fail"));
Requirements
Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 13
DWORD Display_QueryBacklightIntensity { LPDWORD lpdwACBacklight, LPDWORD lpdwBatteryBacklight }
Backlight intensity
Backlight brightness
4
super 3 normal
2
fine 1 micro
0
off
Display_QueryBacklightIntensity
To return the back-light intensity of external power and battery power.
Parameters
lpdwACBacklight
[out] The backlight intensity of external power.
lpdwBatteryBacklight
[out] The backlight intensity of battery power.
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_NULLPTR.
Remarks
The parameters will be one of the values in the following table.
PT-90 Mobile Computer SDK Programming Manual 14
Example
dwResult = Display_QueryBacklightIntensity(&dwValue1, &dwValue2); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("Display_QueryBacklightIntensity fail")); else { CString strTemp;
AfxMessageBox(strTemp); }
DWORD dwResult, dwValue1, dwValue2;
strTemp.Format(_T("AC backlight intensity: %d, Battery backlight intensity: %d"), dwValue1,
dwValue2);
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 15
DWORD GetBacklightStatus { }
GetBacklightStatus
To get screen back-light status.
Parameters
None.
Returned Values
The returned value indicates whether screen back-light is:
1 = screen back-light is ON; or
0 = screen back-light is oOFF.
Example
DWORD dwResult; dwResult = GetBacklightStatus(); if(dwResult == 1) AfxMessageBox(_T("Backlight on")); else AfxMessageBox(_T("Backlight off"));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 16
DWORD PowerOnLCD { BOOL bOn }
PowerOnLCD
To turn ON or OFF the LCD screen power.
Parameters
bOn
[in] Flag that indicates whether to turn ON (TRUE) or OFF (FALSE) the LCD power.
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Remarks
After calling this function with “bOn” FALSE, terminal will only turn OFF the LCD power. It means that terminal
is still working. You should either call this function again to turn ON the LCD power or to reset terminal to use the
terminal with the LCD screen ON.
Example
OS Versions: Windows CE 6.0 or beyond.
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
Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 17
DWORD SetBacklightPWM { int nACPowerPercent, int nBatteryPercent }
nPercent
Backlight brightness
100
super
75
normal
50
fine
25
micro
0
off
SetBacklightPWM
To adjusts the LCD screen back-light brightness.
Parameters
nACPowerPercent,nBatteryPercent
[in] One is the brightness level setting when the terminal is using AC power and the other is the brightness level setting when the terminal is using battery power. These two settings must be one of the values in the table below.
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Remarks
The Back-light Setting function in the Control Panel sets LCD screen back-light brightness level. Calling this
function will also change the brightness level in Back-light Setting. You can use this function or Back-light Setting
function in the Control Panel to adjust back-light brightness level.
Example
DWORD dwResult = SetBacklightPWM(100,100); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("SetBacklightPWM fail"));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 18
DWORD EnableTouchPanel { BOOL bEnable }
EnableTouchPanel
To ENABLE or DISABLE the touch panel.
Parameters
bEnable
[in] Flag that indicates whether to enable(TRUE) or disable(FALSE) the touch panel.
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, possible returned values are
E_FUNC_ERROR.
Example
DWORD dwResult = EnableTouchPanel(TRUE); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("Enable touch panel fail"));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 19
DWORD GetTouchPanelStatus { LPBOOL lpbEnable }
Value
Touch panel status
0
Touch panel disable
1
Touch panel enable
GetTouchPanelStatus
To get touch panel status.
Parameters
lpbEnable
[out] Receive the touch panel status. The returned value can be one of the values in the table below
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, possible returned values are
E_FUNC_ERROR.
Example
BOOL bEnable; DWORD dwResult = GetTouchPanelStatus(&bEnable); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("Get touch panel status fail"));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 20
DWORD EnablePowerButton { BOOL bOn }
KeyPad Related Functions
EnablePowerButton
To ENABLE or DISABLE the POWER button.
Parameters
bOn
[in] Flag that indicates whether to ENABLE the POWER button(TRUE) or to DISABLE the POWER button(FALSE).
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Remarks
If the bOn parameter is FALSE, the POWER button will be DISABLED. The POWER button will not work
when been pressed. If the terminal enters suspend mode, the POWER button will work one time only to wake up
the terminal. When the terminal wakes up, the POWER button will be DISABLED again until this function been
called with parameter TRUE to ENABLE the POWER button.
Example
DWORD dwResult; dwResult = EnablePowerButton(FALSE); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("EnablePowerButton fail"));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 21
DWORD GetKeypadAlphaMode { }
Return value
Alpha mode
0
numeric mode
1
lowercase letter mode
2
uppercase lette mode
GetKeypadAlphaMode
To get the current keypad INPUT mode.
Parameters
None.
Returned Values
The returned value can be one of the values in the table below.
Example
DWORD dwResult; dwResult = GetKeypadAlphaMode(); switch (dwResult){ case 0: AfxMessageBox(_T("Numeric mode")); break; case 1: AfxMessageBox(_T("Lowercase letter mode")); break; case 2: AfxMessageBox(_T("Uppercase letter mode")); break; }
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 22
DWORD SendKbdVirtualKey { BYTE Key }
SendKbdVirtualKey
To send a VIRTUAL KEY to key buffer.
Parameters
Key
[in] Specifies a virtual-key code.
Returned Values
If this action succeeds, the returned value is E_FUNC_SUCCEED. If this action fails, possible returned value is
E_FUNC_PAR_ERROR.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
CString strTemp; strTemp = "VisualKey"; for(int i=0;i<strTemp.GetLength();i++) SendKbdVisualKey((unsigned char)strTemp.GetAt(i));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 23
Loading...
+ 223 hidden pages