Argox PT-9130 User Manual

Page 1
PT-9130 Mobile Computer SDK Programming Manual
DOC NO. UM-PT905-01
Sep. 2012
© 2010-2012 ARGOX Information Co., Ltd.
http://www .argox.com
Page 2
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
Page 3
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
Page 4
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
Page 5
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
Page 6
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
Page 7
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
Page 8
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
Page 9
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
Page 10
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
Page 11
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
Page 12
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
Page 13
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
Page 14
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
Page 15
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
Page 16
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
Page 17
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
Page 18
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
Page 19
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
Page 20
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
Page 21
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
Page 22
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
Page 23
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
Page 24
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
Page 25
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
Page 26
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
Page 27
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
Page 28
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
Page 29
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
Page 30
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
Page 31
DWORD SetKeypadAlphaMode { int nMode }
Value
Alpha mode
0
numeric mode
1
lowercase letter mode
2
uppercase letter mode
SetKeypadAlphaMode
To change keypad INPUT mode.
Parameters
nMode
[in] Flags for setting INPUT mode. This parameterer must be one of the values in the table below.
Returned Values
If this action succeeds, the returnedvalue is E_FUNC_SUCCEED. If this action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
DWORD dwResult; dwResult = SetKeypadAlphaMode(1); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("SetKeypadAlphaMode fail"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 24
Page 32
BOOL GetKeypadLEDStatus { }
LED Related Functions
GetKeypadLEDStatus
To get keypad back-light LED status.
Parameters
None.
Returned Values
The returned value indicates whether keypad back-light LED is ON(TRUE) or OFF(FALSE).
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
BOOL bResult; bResult = GetKeypadLEDStatus(); if(bResult == TRUE) AfxMessageBox(_T("Keypad LED on")); else if(bResult == FALSE) AfxMessageBox(_T("Keypad LED off"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 25
Page 33
DWORD GoodReadLEDOn { BOOL bOn }
GoodReadLEDOn
To turn ON or OFF the goodread LED.
Parameters
bOn
[in] Flag that indicates whether to turn ON(TRUE) or OFF(FALSE) the goodread LED.
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.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
DWORD dwResult; dwResult = GoodReadLEDOn(TRUE); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("GoodReadLEDOn fail"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 26
Page 34
DWORD KeypadLEDOn { BOOL bOn }
KeypadLEDOn
To always turn ON or OFF the keypad LED.
Parameters
bOn
[in] Flag that indicates whether to turn ON (TRUE) or OFF(FALSE) the keypad LED.
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 KeyPad LED Setting in Control Panel is used to set the Keypad LED operation to meet actual application
requirements. Calling this function will set the KeyPad LED to always ON or OFF. Programmer can use this
function or KeyPad LED Setting in the Control Panel to always turn ON or OFF the keypad LED.
Example
DWORD dwResult; dwResult = KeypadLEDOn(TRUE); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("KeypadLEDOn 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 27
Page 35
DWORD QueryKeypadLEDIntensity { LPDWORD lpdwACKeypadLED, LPDWORD lpdwBatteryKeypadLED }
Keypad LED Intensity
Keypad LED Brightness
1
on 0 off
QueryKeypadLEDIntensity
To return the Keypad LED Intensity Setting when using external power and using battery power.
Parameters
lpdwACKeypadLED
[out] The Keypad LED Intensity Setting using external power.
lpdwBatteryKeypadLED
[out] The Keypad LED Intensity Setting using 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 table below.
Example
DWORD dwResult, dwValue1, dwValue2; dwResult = Display_QueryKeypadLEDIntensity(&dwValue1, &dwValue2); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("QueryKeypadLEDIntensity fail")); else {
PT-90 Mobile Computer SDK Programming Manual 28
CString strTemp;
strTemp.Format(_T("AC Keypad LED intensity: %d, Battery Keypad LED intensity: %d"), dwValue1,
dwValue2); AfxMessageBox(strTemp); }
Page 36
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 29
Page 37
DWORD SetKeypadPWM { int nACPowerPercent, int nBatteryPercent }
nPercent
keypad LED brightness
100
on 0 off
SetKeypadPWM
To adjusts Keypad LED Brightness.
Parameters
nACPowerPercent,nBatteryPercent
[in] One is to set Keypad LED Brightness setting when using AC power and the other is to set Keypad LED Brightness setting when using battery. These two parameters 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 Timeout&Brightness function in Control Panel can set Keypad LED Brightness. Calling this function will
also change the Keypad LED Brightness in Timeout&Brighness function. Programmer can use either this
function or Timeout&Brightness function in Control Panel to adjust the Keypad LED Brightness level.
Example
DWORD dwResult = SetKeypadPWM(100,100); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("SetKeypadPWM 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 30
Page 38
void CallSuspend { }
System Related Functions
CallSuspend
To force the terminal entering SUSPEND mode.
Parameters
None.
Returned Values
None.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
//suspend device CallSuspend();
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 31
Page 39
BOOL EnableAutoConnect { BOOL bEnable }
EnableAutoConnect
To turn the AUTOCONNECT function ON or OFF.
Parameters
bEnable
[in] Flag that indicates whether ActiveSync is being automatically executed (TRUE) or not (FALSE) when user plugging host interface cable into the terminal.
Returned Values
Returning TRUE if the operation is successful. otherwise, FALSE.
Remarks
If calling EnableAutoConnect with bEnable set to TRUE, the terminal will automatically execute ActiveSync
program when user plug cable into the terminal. If calling EnableAutoConnect with bEnable set to FALSE, the
terminal will not automatically execute ActiveSync program when user plug cable into the terminal.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
BOOL bResult; bResult = EnableAutoConnect(TRUE); if(bResult == FALSE) AfxMessageBox(_T("EnableAutoConnect fail"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 32
Page 40
DWORD RegisterAlphaKeyNotification { HANDLE hWnd, UINT uMsg }
RegisterAlphaKeyNotification
To Register the application to SYSAPIAX.dll, so that SYSAPIAX.dll will send a window message to the application when the Alpha Key is pressed.
Parameters
hWnd
[in] The handling window of the application to receive the message.
uMsg
[in] The message value to be sent when Alpha Key is pressed.
Returned Values
Return 0 if the operation is successful, otherwise return 1.
Remarks
The application should call UnregisterAlphaKeyNotification function to unregister the prompt message from the
dll.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
if(RegisterAlphaKeyNotification(this->m_hWnd,WM_USER+0x0001)) AfxMessageBox(_T("RegisterAlphaKeyNotification FAIL!!"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 33
Page 41
BOOL ShowChineseIME { BOOL bShow }
ShowChineseIME
To SHOW or HIDE ChineseIME function display
Parameters
bShow
[in] Flag that indicates whether to SHOW(TRUE) or HIDE (FALSE) the Chinese IME function display.
Returned Values
Returning TRUE if the operation is successful, otherwise FALSE.
Remarks
The Chinese IME is only supported in Chinese OS. It will work after calling this function then reset the terminal.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
BOOL bResult; bResult = ShowChineseIME(TRUE); if(bResult == FALSE) AfxMessageBox(_T("ShowChineseIME fail"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 34
Page 42
BOOL ShowDesktop { BOOL bShow }
ShowDesktop
To SHOW or HIDE Desktop function icon display .
Parameters
bShow
[in] Flag that indicates whether to SHOW(TRUE) or HIDE(FALSE) the Desktop function icon display.
Returned Values
Returning TRUE if the operation is successful; otherwise FALSE.
Remarks
After calling this function with parameter FALSE, the terminal will HIDE all icons on Desktop. After calling this
function with parameter TRUE, the terminal will SHOW all icons on Desktop.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
BOOL bResult; bResult = ShowDesktop(TRUE); if(bResult == FALSE) AfxMessageBox(_T("ShowDesktop fail"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 35
Page 43
BOOL ShowExploreToolbar { BOOL bShow }
ShowExploreToolbar
To SHOW or HIDE Internet ExploreToolbar function display in Windows IE.
Parameters
bShow
[in] Flag that indicates whether to SHOW(TRUE) or HIDE(FALSE) the Internet Explorer toolbar in Windows IE.
Returned Values
Returning TRUE if the operation is successful; otherwise FALSE.
Remarks
The ShowExploreToolbar function only affects Windows Internet Explorers been opened already.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
BOOL bResult; bResult = ShowExploreToolbar(TRUE); if(bResult == FALSE) AfxMessageBox(_T("ShowExploreToolbar fail"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 36
Page 44
BOOL ShowTaskbar { BOOL bShow }
ShowTaskbar
To SHOW or HIDE Taskbar function display.
Parameters
bShow
[in] Flag that indicates whether to SHOW(TRUE) or HIDE(FALSE) Taskbar display.
Returned Values
Returning TRUE if the operation is successful; otherwise FALSE.
Remarks
After calling this function, the terminal will SHOW or HIDE Taskbar. If Taskbar is hidden by this function, it needs
to call this function to display Taskbar again.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
BOOL bResult; bResult = ShowTaskbar(TRUE); if(bResult == FALSE) AfxMessageBox(_T("ShowTaskbar fail"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 37
Page 45
DWORD UnregisterAlphaKeyNotification { HANDLE hWnd, }
UnRegisterAlphaKeyNotification
To Unregister AlphaKey Notification function request so that the application will no longer receive Alpha Key been pressed notification messages.
Parameters
hWnd
[in] The handling window of the application.
Returned Values
Returning 0 if the operation is successful, otherwise return 1.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
if(UnregisterAlphaKeyNotification(this->m_hWnd)) AfxMessageBox(_T("UnregisterAlphaKeyNotification FAIL!!"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 38
Page 46
DWORD RegisterTriggerKeyNotification { HANDLE hWnd, UINT uMsg }
wParam
Trigger Key
0
The trigger key is released.
1
The trigger key is pressed.
RegisterTriggerKeyNotification
To Register the application to SYSAPIAX.dll, so that SYSAPIAX.dll will send a window message to the application when the trigger Key is pressed or released
Parameters
hWnd
[in] The handling window of the application to receive the message.
uMsg
[in] The message value to be sent when trigger Key is pressed or released
Returned Values
Return 0 if the operation is successful, otherwise return 1.
Remarks
The application should call UnregisterTriggerKeyNotification function to unregister the prompt message from the
dll. The wParam parameter of window message return the status of trigger key.
Example
if(RegisterTriggerKeyNotification(this->m_hWnd,WM_USER+0x0001)) AfxMessageBox(_T("RegisterTriggerKeyNotification FAIL!!"));
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
PT-90 Mobile Computer SDK Programming Manual 39
Requirements
Link DLL: sysapiax.dll
Device: PT90
Page 47
DWORD UnregisterTriggerKeyNotification { HANDLE hWnd }
UnregisterTriggerKeyNotification
To Unregister triggerkey Notification function request so that the application will no longer receive trigger key been pressed or released notification messages.
Parameters
hWnd
[in] The handling window of the application.
Returned Values
Returning 0 if the operation is successful, otherwise return 1.
Example
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
if(UnregisterTriggerKeyNotification(this->m_hWnd)) AfxMessageBox(_T("UnregisterTriggerKeyNotification FAIL!!"));
Requirements
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 40
Page 48
DWORD VibratorOn { BOOL bOn }
Vibrator Related Functions
VibratorOn
To turn ON or OFF the Vibration indicator
Parameters
bOn
[in] Flag that indicates whether to turn ON(TRUE) or OFF(FALSE) the vibration indicator.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Remarks
You can use this function to activate the vibration indicator of the terminal to alert the user that something is
happening. Calling this function will not change the “Scanner Vibrator” setting.
Example
DWORD dwResult; dwResult = VibratorOn(TRUE); if(dwResult != E_FUNC_SUCCEED) AfxMessageBox(_T("VibratorOn 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 41
Page 49
BOOL WL_Enable
{ }
WLAN Related Function
WL_Enable
To ENABLE the WLAN function.
Parameters
None.
Returned Values
Returning TRUE if the operation is successful; otherwise FALSE.
Example
BOOL bResult; bResult = WL_Enable(); if(bResult == FALSE) AfxMessageBox(_T("Wireless enable 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 42
Page 50
BOOL WL_Disable
{ }
WL_Disable
To DISABLE the WLAN function.
Parameters
None.
Returned Values
Returning TRUE if the operation is successful; otherwise FALSE.
Example
BOOL bResult; bResult = WL_Disable(); if(bResult == FALSE) AfxMessageBox(_T("Wireless disable 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 43
Page 51
BOOL BT_On
{ }
Bluetooth Related Function
BT_On
To ENABLE the Bluetooth function and power.
Parameters
None.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
BT_ERR_CREATE_FAIL, BT_ERR_INUSING.
Example
BOOL bResult; bResult = BT_On(); if(bResult != E_FUNC_SUCCEED) AfxMessageBox(_T("Bluetooth enable fail"));
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 44
Page 52
void BT_Off
{ }
BT_Off
To DISABLE the Bluetooth function and power.
Parameters
None.
Returned Values
None
Example
BT_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 45
Page 53
DWORD SetDiscoverMode
{ BOOL bEnable
}
SetDiscoverMode
Enable or disable terminal discovered mode.
Parameters
bEnable
[in] Flag that indicates whether to enable (TRUE) or disable (FALSE) the terminal discovered mode
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned value is
BT_ERR_SETTING_FAIL.
Example
If(SetDiscoverMode(TRUE) != E_FUNC_SUCCEED) AfxMessageBox(“Setting 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 46
Page 54
BOOL GetDiscoverMode
{ }
GetDiscoverMode
Get terminal current discovered status.
Parameters
None
Returned Values
Return TRUE if terminal can be discovered, otherwise return FALSE.
Example
if(GetDiscoverMode())
AfxMessageBox(_T("Discover mode is enable"));
Else
AfxMessageBox(_T(“Discover mode is disable”));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 47
Page 55
DWORD SetSPPService
{ BOOL bEnable
}
SetSPPService
Enable or disable Bluetooth serial port profile service.
Parameters
bEnable
[in] Flag that indicates whether to enable (TRUE) or disable (FALSE) the serial port profile service mode
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
BT_ERR_SETTING_FAIL, BT_ERR_REG_DEV_FAIL, BT_ERR_SPP_COM_FAIL.
Example
If(SetSPPService(TRUE) != E_FUNC_SUCCEED) AfxMessageBox(“Setting 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 48
Page 56
BOOL GetSPPService
{ }
GetSPPService
Get terminal current serial port profile service status.
Parameters
None
Returned Values
Return TRUE if SPP service is enable, otherwise return FALSE.
Example
if(GetSPPService())
AfxMessageBox(_T("SPP service is enable"));
Else
AfxMessageBox(_T(“SPP service is disable”));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 49
Page 57
DWORD SetFTPService { BOOL bEnable }
SetFTPService
Enable or disable File Transfer Profile service.
Parameters
bEnable
[in] Flag that indicates whether to enable (TRUE) or disable (FALSE) the File Transfer Profile service mode
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
BT_ERR_SETTING_FAIL.
Example
if(SetFTPService(TRUE) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Set FTP service 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 50
Page 58
BOOL GetFTPService { }
GetFTPService
Get terminal current File Transfer Profiel service status.
Parameters
None
Returned Values
Return TRUE if FTP service is enable, otherwise return FALSE.
Example
if(GetFTPService())
AfxMessageBox(_T("FTP service is enable"));
Else
AfxMessageBox(_T(“FTP service is disable”));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 51
Page 59
DWORD SetFTPWriteable { BOOL bWriteable }
SetFTPWriteable
Enable or disable File Transfer Profile writable.
Parameters
bWriteable
[in] Flag that indicates whether to enable (TRUE) or disable (FALSE) the File Transfer Profile writeable mode
Returned Values
Return E_FUNC_SUCCEED if the operation is successful.
Example
if(SetFTPWriteable(TRUE) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Set FTP writeable fail"));
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 52
Page 60
BOOL GetFTPWriteable { }
GetFTPWriteable
Get terminal current File Transfer Profile writeable status.
Parameters
None
Returned Values
Return TRUE if FTP writeable is enable, otherwise return FALSE.
Example
if(GetFTPWriteable())
AfxMessageBox(_T("FTP service is writeable"));
else
AfxMessageBox(_T(“FTP service is diswriteable));
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 53
Page 61
DWORD SetFTPShareFolder { WCHAR *strShareFolder }
SetFTPShareFolder
Setup the File Transfer Profile share folder.
Parameters
strShareFolder
[in] The folder for File Transfer Profile.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned value is
E_FUNC_PAR_ERROR.
Example
if(SetFTPShareFolder(“\\Temp”) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Set FTP Share Folder fail!!"));
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 54
Page 62
DWORD GetFTPShareFolder { WCHAR *strShareFolder, int *nFolderLen }
GetFTPShareFolder
Get terminal current File Transfer Profile share folder.
Parameters
strShareFolder
[out] The buffer to receive the share folder string
nFolderLen
[in/out] The strShareFolder buffer max size. If terminal current share folder length > nFolderLen, the nFolderLen receive current share folder length.
Returned Values
Remarks
Example
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_PAR_ERROR, BT_ERR_INSUFFICIENT.
If function return BT_ERR_INSUFFICIENT, nFolderLen will receive the share folder length of terminal.
WCHAR *strFolder;
int nFolderLen = 256;
strFolder = new WCHAR[nMax];
DWORD dwErr = GetFTPShareFolder(strFolder, & nFolderLen);;
If(dwErr == BT_ERR_INSUFFICIENT){
Delete strFolder; strFolder = new WCHAR[nFolderLen]; GetFTPShareFolder(strFolder, & nFolderLen);
}
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 55
Page 63
DWORD InitSearchBTDevice
{ HANDLE *hLookup
}
InitSearchBTDevice
This function initiates search information.
Parameters
hLookup
[out] Handle to be used when calling the FindNextBTDevice & EndSearchBTDevice function
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR., BT_ERR_DEVICE_ERROR.
Remarks
Must call EndSearchBTDevice function frees the handle after calls to the InitSearchBTDevice and
FindNextBTDevice function.
Example
DWORD dwRe; HANDLE hLookup; ULONGLONG btAddress; WCHAR szDeviceName[128]; dwRe = InitSearchBTDevice(&hLookup)
while(dwRe == E_FUNC_SUCCEED){ dwRe = FindNextBTDevice(hLookup, szDeviceName, &btAddress, 256); if(dwRe == BT_ERR_DEVICE_ERROR) break; ………… } EndSearchBTDevice(hLookup);
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 56
Page 64
DWORD FindNextBTDevice { HANDLE hLookup, LPTSTR szDeviceName, ULONGLONG *btAddress, int nNameLen }
FindNextBTDevice
This function retrieves the results of an nearby Bluetooth device search.
Parameters
hLookup
[in] Handle obtained from InitSearchBTDevice function
szDeviceName
[out] The buffer to receive the device name string
btAddress
nNameLen
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_ERROR.
Remarks
Must call EndSearchBTDevice function frees the handle after calls to the InitSearchBTDevice and
FindNextBTDevice function.
Example
#define GET_NAP(_bt_addr) ( (USHORT) (((_bt_addr) & (ULONGLONG)0xFFFF00000000) >> (8*4)) ) #define GET_SAP(_bt_addr) ( (ULONG) (((_bt_addr) & (ULONGLONG)0x0000FFFFFFFF) >> (0)) )
[out] Receive the device address of 64-bit unsigned integer
[in] The szDeviceName buffer max size. If terminal device name length > nNameLen, the szDeviceName buffer store data of nNameLen length
DWORD dwRe; HANDLE hLookup; ULONGLONG btAddress; WCHAR szAddress[16], szDeviceName[128]; dwRe = InitSearchBTDevice(&hLookup)
while(dwRe == E_FUNC_SUCCEED){
PT-90 Mobile Computer SDK Programming Manual 57
Page 65
dwRe = FindNextBTDevice(hLookup, szDeviceName, &btAddress, 256); if(dwRe == BT_ERR_DEVICE_ERROR) break; ………… wsprintf(szAddress, L"%04X%08X", GET_NAP(btAddress), GET_SAP(btAddress)); ………… } EndSearchBTDevice(hLookup);
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 58
Page 66
DWORD EndSearchBTDevice
{ HANDLE hLookup
}
EndSearchBTDevice
This function frees the search handle.
Parameters
hLookup
[in] Handle obtained from InitSearchBTDevice function
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, BT_ERR_DEVICE_ERROR.
Example
DWORD dwRe; HANDLE hLookup; ULONGLONG btAddress; WCHAR szDeviceName[128]; dwRe = InitSearchBTDevice(&hLookup)
while(dwRe == E_FUNC_SUCCEED){ dwRe = FindNextBTDevice(hLookup, szDeviceName, &btAddress, 256); if(dwRe == BT_ERR_DEVICE_ERROR) break; ………… } EndSearchBTDevice(hLookup);
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 59
Page 67
DWORD InitSearchFTPDevice
{ }
InitSearchFTPDevice
Initial search Bluetooth device support File Transfer Profile service.
Parameters
None
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, BT_ERR_DEVICE_ERROR.
Example
DWORD dwPos, dwRe; WCHAR szDeviceName[128]; ULONGLONG btAddress; If(InitSearchFTPDevice() == E_FUNC_SUCCEED){ dwRe = FindFirstFTPDevice(&dwPos, szDeviceName, & btAddress, 256); while(dwRe == E_FUNC_SUCCEED){ FindNextFPTDevice(&dwPos, szDeviceName, & btAddress, 256); if(dwRe != E_FUNC_SUCCEED) 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 60
Page 68
DWORD FindFirstFTPDevice { DWORD *dwPos, LPTSTR szDeviceName, ULONGLONG *btAddress, int nNameLen }
FindFirstFTPDevice
Get the first searched device position information after calling InitSearchFTPDevice().
Parameters
dwPos
[in/out] a reference to a position value returned by FindFirstBTDevice or FindNextBTDevice function
szDeviceName
[out] The buffer to receive the device name string
btAddress
nNameLen
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_ERROR.
Example
#define GET_NAP(_bt_addr) ( (USHORT) (((_bt_addr) & (ULONGLONG)0xFFFF00000000) >> (8*4)) ) #define GET_SAP(_bt_addr) ( (ULONG) (((_bt_addr) & (ULONGLONG)0x0000FFFFFFFF) >> (0)) ) DWORD dwPos, dwRe; WCHAR szDeviceName[128], szAddress[16]; ULONGLONG btAddress; If(InitSearchFTPDevice() == E_FUNC_SUCCEED){
[out] Receive the device address of 64-bit unsigned integer
[in] The szDeviceName buffer max size. If terminal device name length > nNameLen, the szDeviceName buffer store data of nNameLen length
dwRe = FindFirstFTPDevice(&dwPos, szDeviceName, & btAddress, 256); while(dwRe == E_FUNC_SUCCEED){ FindNextFPTDevice(&dwPos, szDeviceName, & btAddress, 256); if(dwRe != E_FUNC_SUCCEED) break; …………
PT-90 Mobile Computer SDK Programming Manual 61
Page 69
wsprintf(szAddress, L"%04X%08X", GET_NAP(btAddress), GET_SAP(btAddress)); ………… } }
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 62
Page 70
DWORD FindNextFTPDevice { DWORD *dwPos, LPTSTR szDeviceName, ULONGLONG *btAddress, int nNameLen }
FindNextFTPDevice
Get the next searched device position information.
Parameters
dwPos
[in/out] a reference to a position value returned by FindFirstBTDevice or FindNextBTDevice function
szDeviceName
[out] The buffer to receive the device name string
btAddress
nNameLen
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_ERROR.
Example
#define GET_NAP(_bt_addr) ( (USHORT) (((_bt_addr) & (ULONGLONG)0xFFFF00000000) >> (8*4)) ) #define GET_SAP(_bt_addr) ( (ULONG) (((_bt_addr) & (ULONGLONG)0x0000FFFFFFFF) >> (0)) ) DWORD dwPos, dwRe; WCHAR szDeviceName[128], szAddress[16]; ULONGLONG btAddress; If(InitSearchFTPDevice() == E_FUNC_SUCCEED){
[out] Receive the device address of 64-bit unsigned integer
[in] The szDeviceName buffer max size. If terminal device name length > nNameLen, the szDeviceName buffer store data of nNameLen length
dwRe = FindFirstFTPDevice(&dwPos, szDeviceName, & btAddress, 256); while(dwRe == E_FUNC_SUCCEED){ FindNextFPTDevice(&dwPos, szDeviceName, & btAddress, 256); if(dwRe != E_FUNC_SUCCEED) break; …………
PT-90 Mobile Computer SDK Programming Manual 63
Page 71
wsprintf(szAddress, L"%04X%08X", GET_NAP(btAddress), GET_SAP(btAddress)); ………… } }
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 64
Page 72
DWORD PairDevice { ULONGLONG btAddress unsigned char PinCode[16] }
PairDevice
Pair terminal with other device.
Parameters
btAddress
[in] The device address for pair with
PinCode
[in] The pin code for connection
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
BT_ERR_PAIR_FAIL, BT_ERR_DEVICE_ERROR.
Example
if(PairDevice(btAddress, PinCode) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Pair 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 65
Page 73
DWORD UnPairDevice { ULONGLONG btAddress }
UnPairDevice
Unpair terminal with other device.
Parameters
btAddress
[in] The device address for unpair
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned value is
BT_ERR_DEVICE_ERROR.
Example
PairDevice(btAddress, PinCode);
............
UnPairDevice(btAddress);
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 66
Page 74
DWORD GetComInfo { int *nComSum, LPCWSTR pComValue, int *nComValueLen }
GetComInfo
Get com identifier index and amount from device hardware.
Parameters
nComSum
[out] Receive the device com amount
pComValue
[out] The buffer to receive the device com identifier index
nComValueLen
Returned Values
Remarks
Example
[in/out] The pComValue buffer max size. If terminal com value length > nComValueLen, the nComValueLen receive current com value length.
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned value is
E_FUNC_ERROR, BT_ERR_INSUFFICIENT.
If function return BT_ERR_INSUFFICIENT, nComValueLen will receive the com value length of terminal.
WCHAR * pComValue;
int nComSum = 0, nComValueLen = 10;
pComValue = new WCHAR[nComValueLen];
DWORD dwErr = GetComInfo(&nComSum, pComValue, & nComValueLen);
If(dwErr == BT_ERR_INSUFFICIENT){
Delete pComValue; pComValue = new WCHAR[nComValueLen]; GetComInfo(&nComSum, pComValue, & nComValueLen);
}
Requirements
OS Versions: Windows CE 6.0 or beyond.
PT-90 Mobile Computer SDK Programming Manual 67
Page 75
Header: sysapiax.h Link Library: sysapiax.lib
Link DLL: sysapiax.dll
Device: PT90
PT-90 Mobile Computer SDK Programming Manual 68
Page 76
DWORD ConnectDevice { ULONGLONG btAddress, CONNECT_INFO *Info, BOOL nConnect }
ConnectDevice
Connect to Bluetooth device for SPP or FTP.
Parameters
btAddress
[in] The device address for connect
Info
[in] The device connect information., see CONNECT_INFO data structure.
nConnect
[in] Connect status. 1  connect, 0  disconnect
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_CHANNEL, BT_ERR_REG_DEV_FAIL,
BT_ERR_DEVICE_ERROR.
Example
if(ConnectDevice(btAddrecc, &Info, 1) == E_FUNC_SUCCEED){
………… } ConnectDevice(btAddress, &Info, 0);
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 69
Page 77
DWORD GetConnectStatus { ULONGLONG btAddress, int nConnectType, LPCWSTR pCom, int *nStatus }
GetConnectStatus
Query the device connect status.
Parameters
btAddress
[in] Bluetooth device address
nConnectType
[in] Connect profile type. 1 Serial port profile, 2  File transfer profile
Returned Values
Example
pCom
[in] The connect com for Serial port profile, must be four characters long.. Contains "COM"+ com
identifier index, for example "COM7". If nConnectType parameter is 2 (FTP), pCom ben’t to check
nStatus
[out] The device connect status
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned value is
E_FUNC_PAR_ERROR.
GetConnectStatus(btAddress, 1, _T("COM7"), &nStatus); if(nStatus)
AfxMessageBox(_T("SPP Connect!!")); else
AfxMessageBox(_T(“SPP Disconnect”));
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 70
Page 78
DWORD GetSPPClientChannel { ULONGLONG btAddress, int *nChannel }
GetSPPClientChannel
Get the device serial port profile channel.
Parameters
btAddress
[in] The device address which to get SPP channel
nChannel
[out] Receive queried channel
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, BT_ERR_DEVICE_ERROR.
Example
if(GetSPPClientChannel(btAddress, &nChannel) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Get channel 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 71
Page 79
DWORD FindFirstFTPFile { WCHAR *path, FTP_FILE *File }
FindFirstFTPFile
Get first file information from share folder in the connected device.
Parameters
path
[in] The path of connected device for search file.
File
[out] The first searched file information in the path, see FTP_FILE data structure.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT, BT_ERR_FTP_DIR_FAIL, BT_ERR_FTP_EMPTY_FILE.
Example
FTP_FILE File; DWORD dwErr = FindFirstFTPFile(_T(“\\”), &File); If(dwErr==E_FUNC_SUCCEED){
Do{
………… dwErr = FindNextFTPFile(&File);
}while(dwErr == E_FUNC_SUCCEED); }
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 72
Page 80
DWORD FindNextFTPFile { FTP_FILE *File }
FindNextFTPFile
Get next file information from share folder in the connected device.
Parameters
File
[out] The received file information, see FTP_FILE data structure.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT, BT_ERR_FTP_EMPTY_FILE.
Example
FTP_FILE File; DWORD dwError = FindFirstFTPFile(_T(“\\”), &File); If(dwErr == E_FUNC_SUCCEED){
Do{
………… dwErr = FindNextFTPFile(&File);
}while(dwErr == E_FUNC_SUCCEED); }
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 73
Page 81
DWORD GetFTPFile { LPCWSTR pTargetFile }
GetFTPFile
Get file from share folder in the connected device.
Parameters
pTargetFile
[in] The file to get from connected device
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
Example
if(GetFTPFile(_T(\\record.txt)) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Get file 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 74
Page 82
DWORD PutFTPFile { LPCWSTR pSourceFile, LPCWSTR pTargetPath }
PutFTPFile
Send file to share folder in the connected device.
Parameters
pSourceFile
[in] The source file in the share folder to transfer to connected device.
pTargetPath
[in] The target path in the connected device to save file.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
Example
if(PutFTPFie(_T(\\Temp\\record.txt, _T(\\Collect)) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Put file 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 75
Page 83
DWORD CreateFTPFolder { LPCWSTR pTarget }
CreateFTPFolder
Create a new folder to share folder in the connected device.
Parameters
pTarget
[in] The folder which be created to share folder in the connected device
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
Example
if(CreateFTPFolder(_T(“\\ FTP Folder”) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Create folder 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 76
Page 84
DWORD DeleteFTPFolder { LPCWSTR pTarget }
DeleteFTPFolder
Delete folder from share folder in connected device.
Parameters
pTarget
[in] The folder will be deleted from share folder in the connected device
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
Example
Requirements
OS Versions: Windows CE 6.0 or beyond. Header: sysapiax.h Link Library: sysapiax.lib
if(DeleteFTPFolder(_T(“\\FTP Folder”)) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Delete folder fail!!"));
Link DLL: sysapiax.dll Device: PT90
PT-90 Mobile Computer SDK Programming Manual 77
Page 85
DWORD DeleteFTPFile { LPCWSTR pTarget }
DeleteFTPFile
Delete file from share folder in connected device.
Parameters
pTarget
[in] The file will be deleted from share folder in the connected device.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_NOT_CONNECT.
Example
if(DeleteFTPFile(_T(“\\ FTP Folder \\record.txt”)) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Delete file 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 78
Page 86
DWORD Camera_On
{ HWND hVideoWnd
}
Camera Related Function
Camera_On
To ENABLE the Camera function and initial.
Parameters
hVideoWnd
[in] The handle of new owner window. This parameter can set NULL.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
CAM_ERR_CREATE_FAIL, CAM_ERR_VERSION_ERROR, CAM_ERR_GET_DEVICE_FAIL, CAM_ERR_VIDEO_WINDOW_FAIL, CAM_ERR_STILL_SETTING_FAIL.
Example
if(Camera_On(NULL) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Camera on 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 79
Page 87
void Camera_Off
{ }
Camera_Off
To DISABLE the Camera function and release.
Parameters
None.
Returned Values
None
Example
BT_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 80
Page 88
DWORD SetPreviewSize
{ UINT uiPosX UINT uiPosY UINT uiWidth UINT uiHeight
}
SetPreviewSize
To set the x-axis coordinate、y-axis coordinate、width、height of the preview window.
Parameters
uiPosX
[in] Specifies the x-axis coordinate to be set. Range: 0~240.
uiPosY
[in] Specifies the y-axis coordinate to be set. Range: 0~320.
uiWidth
uiHeight
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, CAM_ERR_DEVICE_ERROR.
Example
UINT uiPosX, uiPosY, uiWidth, uiHeight; uiPosX = 0; uiPosY = 0; uiWidth = 240; uiHeight = 320; if(SetPreviewSize(uiPosX, uiPosY, uiWidth, uiHeight) != E_FUNC_SUCCEED)
[in] Specifies the width to be set. Range: 0~240.
[in] Specifies the height to be set. Range: 0~320.
AfxMessageBox(_T("Set preview size 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 81
Page 89
DWORD GetPreviewSize
{ UINT *uiPosX UINT *uiPosY UINT *uiWidth UINT *uiHeight
}
GetPreviewSize
To get the x-axis coordinate、y-axis coordinate、width、height of the preview window.
Parameters
uiPosX
[out] Specifies the x-axis coordinate to be retrieved.
uiPosY
[out] Specifies the y-axis coordinate to be retrieved.
uiWidth
[out] Specifies the width to be retrieved.
uiHeight
[out] Specifies the height to be retrieved.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
CAM_ERR_DEVICE_ERROR.
Example
UINT uiPosX, uiPosY, uiWidth, uiHeight; if(GetPreviewSize(&uiPosX, &uiPosY, &uiWidth, &uiHeight) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Get preview size 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 82
Page 90
DWORD EnablePreview
{ BOOL bEnable
}
EnablePreview
Change to ENABLE or DISABLE of the preview window.
Parameters
bEnable
[in] Flag that indicates whether to ENABLE(TRUE) or DISABLE(FALSE) preview window.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, CAM_ERR_DEVICE_ERROR.
Example
if(EnablePreview(TRUE) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Enable preview 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 83
Page 91
DWORD SetStillCaptureSize
{ DWORD dwImageSize
}
Value
Image pixel
0
QSXGA (2560*1944)
1
SXGA (1280*960)
SetStillCaptureSize
To set the image pixel for still picture capture.
Parameters
dwImageSize
[in] Flags for setting image pixel. This parameterer must be one of the values in the table below.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, CAM_ERR_STILL_SETTING_FAIL, CAM_ERR_DEVICE_ERROR.
Example
DWORD dwSize; dwSize = 1; if(SetStillCaptureSize(dwSize) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Set still capture size 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 84
Page 92
DWORD GetStillCaptureSize
{ DWORD *dwImageSize
}
GetStillCaptureSize
To get the image pixel setting value for still picture capture.
Parameters
dwImageSize
[out] Receive the image pixel setting value.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, CAM_ERR_DEVICE_ERROR.
Example
DWORD dwSize; if(GetStillCaptureSize(&dwSize) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Get still capture size 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 85
Page 93
DWORD StartStillCapture
{ LPTSTR lpPathName BOOL bSound
}
StartStillCapture
To Start with still picture capture and save to file path.
Parameters
lpPathName
[in] Pointer to the file save path after capture still picture. Max size of 256.
bSound
[in] Flag that indicates whether to ENABLE(TRUE) or DISABLE(FALSE) shutter sound.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, CAM_ERR_NOT_SAVE_PATH, CAM_ERR_STILL_SOUND_FAIL, CAM_ERR_DEVICE_ERROR.
Example
WCHAR szPictureName[256]; wcscpy(szPictureName, L”\\My Documents\\Img_01.jpg”); if(StartStillCapture(szPictureName, TRUE) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Still capture 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 86
Page 94
DWORD SetFlash
{ BOOL bEnable
}
SetFlash
To set ENABLE or DISABLE the flash light.
Parameters
bEnable
[in] Flag that indicates whether to ENABLE(TRUE) or DISABLE(FALSE) flash light.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Example
if(SetFlash(TRUE) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Enable flash 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 87
Page 95
BOOL GetFlash
{ }
GetFlash
To get the flash light setting value.
Parameters
None.
Returned Values
Return TRUE if flash light is enable, otherwise return FALSE
Example
if(GetFlash () != TRUE)
AfxMessageBox(_T("Flash is disable));
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 88
Page 96
DWORD SetDarkMode
{ BOOL bEnable
}
SetDarkMode
To set ENABLE or DISABLE the dark mode
Parameters
bEnable
[in] Flag that indicates whether to ENABLE(TRUE) or DISABLE(FALSE) dark mode.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Example
if(SetDarkMode (TRUE) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Dark mode is disable"));
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 89
Page 97
BOOL GetDarkMode
{ }
GetDarkMode
To get the dark mode setting value.
Parameters
None.
Returned Values
Return TRUE if dark mode is enable, otherwise return FALSE
Example
if(GetDarkMode() != TRUE)
AfxMessageBox(_T("Dark mode is disable));
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 90
Page 98
DWORD SetInvert
{ BOOL bFlip BOOL bMirror
}
SetInvert
To set the media stream invert, include flip、mirror.
Parameters
bFlip
[in] Flag that indicates whether to ENABLE(TRUE) or DISABLE(FALSE) media stream invert of
upside down.
bMirror
[in] Flag that indicates whether to ENABLE(TRUE) or DISABLE(FALSE) media stream invert of
left to right.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR.
Example
if(SetInvert(1, 1) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Set invert 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 91
Page 99
DWORD GetInvert
{ BOOL *bFlip BOOL *bMirror
}
GetInvert
To get the media stream invert setting value, include flip、mirror..
Parameters
bFlip
[out] Receive the media stream flip setting value.
bMirror
[out] Receive the media stream mirror setting value.
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR.
Example
BOOL bFlip, bMirror; if(GetInvert(&bFlip, &bMirror) != E_FUNC_SUCCEED)
AfxMessageBox(_T("Get invert 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 92
Page 100
DWORD GPRS_On
{ }
GPRS Related Function
GPRS_On
To ENABLE the GPRS function and initial.
Parameters
None
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
GPRS_ERR_CREATE_FAIL, GPRS_ERR_VERSION_ERROR.
Example
if(GPRS_On(NULL) != E_FUNC_SUCCEED)
AfxMessageBox(_T("GPRS on 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 93
Loading...