Getac Software Development Kit Spec R17 20130314
Getac Software Development Kit Spec R17 20130314
Getac Software Development Kit Spec R17 20130314
Revision History
Table of Contents
Revision History ................................................................
................................................................................................
.......................................2
Table of Contents ................................................................................................................................
................................ .....................................3
1. Overview ................................................................
................................................................................................
..............................................6
2. System Support................................................................................................................................
................................ .....................................6
Hardware ................................................................
................................................................................................
..........................................6
What You Need to Get Started ................................................................................................
................................ ..........................................6
3. Naming Rule of OS Version Label ................................................................................................
................................ ........................................7
3.1 PS236/PS535/MH132 ................................................................................................
................................ ..............................................7
3.2 PS336 ................................................................
................................................................................................
......................................7
4. Architecture ................................................................
................................................................................................
..........................................8
ExternAPI.DLL ................................................................................................................................
................................ ................................8
GPSID ................................................................
................................................................................................
..............................................8
5. Getac APIs Reference ................................................................................................
................................ ......................................................... 10
5.1 E-compass/G-sensor API’s ................................................................................................
................................ ........................................ 10
EComAcc_InitDevice ................................................................................................
................................ ............................................. 10
EComAcc_DeinitDevice ................................................................................................
................................ ......................................... 11
EComAcc_GetData ................................................................................................
................................ ................................................. 12
ECompass_GetRawData ................................................................................................
................................ ......................................... 13
GSensor_GetData ................................................................................................
................................ ................................................... 14
GSensor_GetRawData ................................................................................................
................................ ............................................ 15
5.2 Pressure sensor API’s ................................................................................................
................................ ................................................ 16
Pressure_InitDevice ................................................................................................
................................ ................................................ 16
Pressure_DeinitDevice ................................................................................................
................................ ............................................ 17
Pressure_GetPaTemp ................................................................................................
................................ .............................................. 18
5.3 GPS API’s ................................................................................................................................
................................ ................................. 19
GPS with GPS Intermediate Driver ................................................................
......................................................... 19
GPS without GPS Intermediate Driver
Drive ................................................................
.................................................... 21
5.4 System Acoustic Control ................................................................................................
................................ ........................................... 23
Speaker_GetVolume ................................................................................................
................................ ................................................ 23
Speaker_SetVolume ................................................................................................
................................ ................................................ 24
Receiver_GetVolume ................................................................................................
................................ .............................................. 25
Receiver_SetVolume ................................................................................................
................................ ............................................... 26
Microphone Gain Control (Only for MH132) ................................................................
.......................................... 27
5.5 System LED control ................................................................................................
................................ .................................................. 28
Charging LED
ED Indicator Control .............................................................................................
............................. 28
Date: 2013/3/14
Getac Handheld Device
Page: 4
Software Development Kit
Total: 79
1. Overview
This document describes the architecture and functionalities of the Getac Handheld Device SDK
(Software Development Kit). The SDK will provide
pro the API set to access/control E-compass,
compass, G
G-sensor,
Pressure sensor, GPS data and system related information.
2. System Support
Hardware
Since Getac Handheld Device is using Microsoft Windows Mobile Operating System, please m
make sure
the following software is installed on your development environment.
• Microsoft Visual Studio 2005/2008 or even higher
• Microsoft ActiveSync 4.5 (for XP) or Windows Mobile Device Center (for Vista/Win7)
• Related Platform SDKs which provided by Microsoft
Microsoft to support you to develop specific
application.
Getac PS236 EXT W/O 3G Microsoft Windows Mobile Visual Studio 2005/2008
6.0 Professional SDK
Getac PS236 EXT W/3G Microsoft Windows Mobile Visual Studio 2005/2008
6.0 Professional SDK
Getac MH132 (WM 6.5) Microsoft Windows Mobile Visual Studio 2005/2008
6.5 DTK
Getac PS336 (WEH6.5) Microsoft Windows Mobile Visual Studio 2005/2008
6.5 DTK
3.2 PS336
The version number of Getac Handheld Product
Produ has general naming rule. The format of section
is 1.XXX.YYY.LLL.
4. Architecture
ExternAPI.DLL
This DLL will be shipped as part of the ROM image on Getac PS236/PS336/PS535 and it will have to
support all functions referenced by this document. The header file will be published to expose all APIs
defined within the DLL. The intention of this DLL is to allow other applications to query and set
characteristics for the Getac PS236/PS336/PS535
/PS336/PS535 hardware and software.
GPSID
Without the GPS Intermediate Driver, applications generally access GPS hardware directly through a
Date: 2013/3/14
Getac Handheld Device
Page: 9
Software Development Kit
Total: 79
COM port.
Applications interact directly with the GPS hardware by calling CreateFile to obtain a handle to the
device. With most GPS devices, this connection is exclusive, so only
only one application at a time can
interact with the GPS hardware.
Applications then call ReadFile repeatedly to retrieve GPS location data encoded using the National
Marine Electronics Association (NMEA) standard or GPS raw data.
• Enable multiple applications to use GPS hardware at the same time. The GPS Intermediate
Driver makes it appear that each application has its own dedicated GPS hardware.
• Remove the need for applications to parse NMEA strings to obtain meaningful data. The GPS
Intermediate Driver internally parses the NMEA strings obtained from the GPS hardware and
makes the parsed information available through a friendly API that contains structures like
GPS_POSITION and calls like GPSGetLocation. Applications can also use a
ReadFile interface. This ability provides an easy way for existing
backward-compatible stream/ReadFile
applications to use the GPS Intermediate Driver
Driver without requiring modification.
EComAcc_InitDevice
Syntax
INT16 EComAcc_InitDevice(void)
Description
This function will initialize E-compass/G-sensor
E hardware and related software memory
handling. It has to be called prior to get the data.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
EComAcc_DeinitDevice
Syntax
INT16 EcomAcc_DeinitDevice(void)
Description
This function will de-initialize
initialize E-compass/G-sensor
E sensor hardware and related software memory
handling. It has to be called after finishing data query procedure. Otherwise, it might have memory
leakage or handle leakage problem.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
EComAcc_GetData
Syntax
BOOL EComAcc_GetData(int data[])
Description
This function will used to get E
E-compass/G-sensor Theta, Pitch, Roll angle data, and HDST
status.
Parameters
data
[out] Pointer to an array that receives the output data for the operation.
data[0] Theta
data[1] Pitch
data[2] Roll angle
data[3] HDST, 0 and 1 means calibration is NOT completed
2 and 3 means calibration is completed
Return value
TRUE indicates success. FALSE indicates failure
ECompass_GetRawData
Syntax
BOOL ECompass_GetRawData(int data[],eDataType eType)
Description
This function will used to get E
E-compass raw Theta, Pitch and Roll
oll angle data
data.
Parameters
eType
[in] Data type MEASUREMENT_RAW_DATA
data
[out] Pointer to an array that receives the output data for the operation.
data[0] Theta
data[1] Pitch
data[2] Roll angle
Return value
TRUE indicates success. FALSE indicates failure
GSensor_GetData
Syntax
BOOL GSensor_GetData(int
_GetData(int data[])
Description
This function will used to get G
G-sensor Pitch and Roll angle data.
Parameters
data
[out] Pointer to an array that receives the output data for the operation.
GSensor_GetRawData
Syntax
BOOL GSensor_GetRawData (int data[])
Description
This function will used to get G
G-sensor Pitch and Roll angle data.
Parameters
data
[out] Pointer to an array that receives the output data for the operation.
data[0] Theta
data[1] Pitch
data[2] Roll angle
Return value
TRUE indicates success. FALSE indicates failure
Pressure_InitDevice
Syntax
BOOL Pressure_InitDevice(void)
Description
This function will initialize Pressure sensor hardware and related software memory handling.
It has to be called prior to get the data.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
Pressure_DeinitDevice
Syntax
BOOL Pressure_DeinitDevice(void)
Description
This function will de-initialize
initialize Pressure sensor hardware and related software memory
handling. It has to be called after finishing data query procedure. Otherwise, it might have memory
leakage or handle leakagee problem.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
Pressure_GetPaTemp
Syntax
BOOL Pressure_GetPaTemp(float
Pressure_GetPaTemp( data[])
Description
This function will used to get Pressure sensor PA and Temperature raw data.
Parameters
data
[out] Pointer to an array that receives the output data for the operation.
Return value
TRUE indicates success. FALSE indicates failure
CreateFile
Syntax
HANDLE CreateFile( LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
Description
This API is provided by Microsoft which is used for opening a GPS device po
port.
It returns
ns a handle to access the device.
device
Parameters
lpFileName
[in] Pointer to a null-terminated
null terminated string that specifies the name of the object. It has to
be set as GPD1 for GPS usage
Note: The table list as below describes the different setting during Getac Products.
dwDesiredAccess
[in] Type of access to the object. It has to be (GENERIC_READ |
GENERIC_WRITE) for GPS usage.
dwShareMode
[in] Share mode for the object. It has to be (FILE_SHARE_READ | FILE_SHARE_
WRITE) for GPS usage.
Date: 2013/3/14
Getac Handheld Device
Page: 20
Software Development Kit
Total: 79
lpSecurityAttributes
[in] Not used. It has to be set as NULL for GPS usage.
dwCreationDisposition
[in] Action to take on files that exist, and which action to take when files do not exist. It
has to be OPEN_EXISTING for GPS usage.
dwFlagsAndAttributes
[in] File attributes and flags for the file. It has to be FILE_ATTRIBUTE_NORMAL for
GPS usage.
hTemplateFile
[in] Ignored. It has to be set as NULL for GPS usage.
Return value
An openned handle to the specified file indicates success.
success. If the specified file exists before the
function call and dwCreationDisposition is set to CREATE_ALWAYS or OPEN_ALWAYS, a
call to GetLastError returns ERROR_ALREADY_EXISTS, even though the function has
succeeded. If the file does not exist before the call, GetLastError returns zero.
INVALID_HANDLE_VALUE indicates failure. To get extended error information, call
GetLastError.
CreateFile
Syntax
HANDLE CreateFile( LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
Description
This API is provided by Microsoft which is used for opening a GPS device po
port.
It returns
ns a handle to access the device.
device
Parameters
lpFileName
[in] Pointer to a null-terminated
null terminated string that specifies the name of the objec
object
Note: The table list as below describes the different setting during Getac Products.
dwDesiredAccess
[in] Type of access to the object. It has to be (GENERIC_READ |
GENERIC_WRITE) for GPS usage.
dwShareMode
[in] Share mode for the object. It has to be (FILE_SHARE_READ | FILE_SHARE_
WRITE) for GPS usage.
lpSecurityAttributes
[in] Not used. It has to be set as NULL for GPS usage.
dwCreationDisposition
[in] Action to take on files that exist, and which action to
to take when files do not exist.
Date: 2013/3/14
Getac Handheld Device
Page: 22
Software Development Kit
Total: 79
Speaker_GetVolume
Syntax
BOOL Speaker_GetVolume(DWORD*
Volume(DWORD* pdwLevel)
Description
This function will used to get the volume level of system speaker.
Parameters
pdwLevel
[out] Pointer that receives the current volume level of system speaker. The range of
volume level will be 0 to 5.
Return value
TRUE indicates success. FALSE indicates failure
Speaker_SetVolume
Syntax
BOOL Speaker_SetVolume(DWORD
Volume(DWORD dwLevel)
Description
This function will used to set the volume level of system speaker.
Parameters
dwLevel
[in] DWORD parameter contains the speaker level value from 0 to 5. 0 means system
speaker mute.
Return value
TRUE indicates success. FALSE indicates failure
Receiver_GetVolume
Syntax
BOOL Receiver_GetVolume(DWORD*
Volume(DWORD* pdwLevel)
Description
This function will used to get the volume level of system receiver.
Parameters
pdwLevel
[out] Pointer that receives the current volume level of system receiver. The range of
volume level will be 0 to 5.
Remark
This API is supported in Phone SKU (ID = 50) only.
Return value
TRUE indicates success. FALSE indicates failure
Receiver_SetVolume
Syntax
BOOL Receiver_SetVolume(DWORD
Volume(DWORD dwLevel)
Description
This function will used to set the volume level of system receiver.
Parameters
dwLevel
[in] DWORD parameter contains the receiver level value from 0 to 5. 0 means system
receiver mute.
Remark
This API is supported in Phone SKU (ID = 50) only.
Return value
TRUE indicates success. FALSE indicates failure
SetEvent(ghevNotCameraMode);
Date: 2013/3/14
Getac Handheld Device
Page: 28
Software Development Kit
Total: 79
Syntax
BOOL WINAPI NLedSetDevice( UINT nDeviceId,
void* pInput);
Description
This function allows user to control Charging LED for On, Off or Blinking.
Parameters
nDeviceId
[in] Integer that specifies what information to set. You can set it to
NLED_SETTINGS_INFO_ID to indicate that the pInput buffer contains information
about the current settings for the notification LED.
pInput
[in] Pointer to the buffer that contains the NLED_SETTINGS_INFO structure. This
structure contains the new settings for the notification LED.
NLED_SETTINGS_INFO *pNLED;
Syntax
BOOL WINAPI NLedSetDevice( UINT nDeviceId,
void* pInput);
Description
This function allows user to control Camera Flash LED in the back side for On and Off only.
Camera Flash LED does not support Blinking feature.
Parameters
nDeviceId
[in] Integer that specifies what information to set. You can set it to
NLED_SETTINGS_INFO_ID to indicate that the pInput buffer contains information
about the current settings for the notification LED.
pInput
[in] Pointer to the buffer that contains the NLED_SETTINGS_INFO structure. This
structure contains
tains the new settings for the notification LED.
NLED_SETTINGS_INFO *pNLED;
pNLED;
Set_BT_LED_ON
Syntax
BOOL Set_BT_LED_ON(BOOL OnOff)
Description
This function will used to set
et the bluetooth LED indicator on/off.
Parameters
OnOff
[in] Set LED on/off.
Return value
TRUE indicates success. FALSE indicates failure
Set_WIFI_LED_ON
Syntax
BOOL Set_WIFI_LED_ON(BOOL OnOff)
Description
This function will used to set
et the WiFi LED indicator on/off.
Parameters
OnOff
[in] Set LED on/off.
Return value
TRUE indicates success. FALSE indicates failure
Set_3G_LED_ON
Syntax
BOOL Set_3G_LED_ON(BOOL OnOff)
Description
This function will used to set
et the 3G LED indicator on/off.
Parameters
OnOff
[in] Set LED on/off.
Return value
TRUE indicates success. FALSE indicates failure
Set_GPS_LED_ON
Syntax
BOOL Set_GPS_LED_ON(BOOL
_LED_ON(BOOL OnOff)
Description
This function will used to set
et the GPS LED indicator on/off.
Parameters
OnOff
[in] Set LED on/off.
Return value
TRUE indicates success. FALSE indicates failure
Backlight_GetLevel
Syntax
BOOL Backlight_GetLevel(DWORD*
Level(DWORD* pdwLevel)
Description
This function will used to get the brightness level of backlight.
Parameters
pdwLevel
[out] Pointer that receives the current brightness level of system receiver
receiver. The range of
level will be 0 to 9. Zero means turn off backlight.
Note: For Getac MH132, pdwLevel will be 0 to 10. Return False if out of this range.
Return value
TRUE indicates success. FALSE indicates failure
Backlight_SetLevel
Syntax
BOOL Backlight_SetLevel(DWORD
SetLevel(DWORD dwLevel)
Description
This function will used to set the brightness level of backlight.
Parameters
dwLevel
[in] DWORD that contains the brightness level for backlight control. The range of level
will
ll be 0 to 9. Zero means turn off backlight.
Return value
TRUE indicates success. FALSE indicates failure
Phone_OnOff
Syntax
BOOL Phone_OnOff(BOOL bPowerOn)
Description
This function will be used to turn On/Off the power of the phone module.
Parameters
bPowerOn
[in] Boolean that controls the power state of the Phone module. TRUE will turn on and
FALSE will turn off the Phone module.
Remark
This API is supported in Phone SKU (ID = 50) only.
Return value
TRUE indicates success. FALSE indicates failure
WLAN_OnOff
Syntax
BOOL WLAN_OnOff(BOOL bPowerOn)
Description
This function will be used to turn On/Off the power of the WLAN module.
Parameters
bPowerOn
[in] Boolean that controls the power state of the WLAN module. TRUE will turn on and
FALSE will turn off the WLAN module.
Remark
This API is supported in WLAN module integrated product only.
Return value
TRUE indicates success. FALSE indicates failure
Bluetooth_OnOff
Syntax
BOOL Bluetooth_OnOff(BOOL bPowerOn)
Description
This function will be used to turn On/Off the power of the Bluetooth module
module.
Parameters
bPowerOn
[in] Boolean value that controls the power state of the Bluetooth module.
module TRUE will turn
on and FALSE will turn off the Bluetooth module.
Remark
This API is supported in Bluetooth module integrated product only.
Return value
TRUE indicates success. FALSE indicates failure
FlightMode_OnOff
Syntax
BOOL FlightMode_OnOff(BOOL bModeOn)
Description
This function will be used to enter/exit Flight mode. It will turn off all RF components to meet
the aviation regulatory and back on according to the previous status.
Parameters
bModeOn
[in] Boolean value that controls the power state of all RF components which contain
Phone, WLAN, Bluetooth & GPS modules.
modules TRUE will force system to enter Flight mode
and turn the power off. FALSE will turn back on the power of RF components accord
according
to the previous state.
Return value
TRUE indicates success. FALSE indicates failure
GetSystemUUID
Syntax
BOOL GetSystemUUID(BYTE* lpUUID, DWORD dwSize)
BOOL GetSystemUUID(BYTE* lpUUID) for MH132
Description
This function will be used to receive the UUID of this device. UUID, is a unique, 128-bit
128
value used to identify objects.
objects. User must allocate enough memory for 16 bytes at least.
Parameters
lpUUID
[out] The pointer to an UUID value must allocated
alloc 16 bytes at least.
dwSize
[in] The buffer size of lpUUID, must bigger than 16.
16 MH132 doesn’t have this parameter.
Return value
TRUE indicates success. FALSE indicates failure
GetDeviceName
Syntax
BOOL GetDeviceName(TCHAR* lpszName, DWORD dwSize)
BOOL GetDeviceName(TCHAR* lpszName) for MH132
Description
This function will get the product name of this device. User must allocate enough memory for
20 characters wide string at least.
Parameters
lpszName
[out] The pointer to a string with allocated memory of 20 characters wide string at least.
dwSize
[in] The buffer size of lpszName,
lpszName must bigger than 20. MH132 doesn’t have this
parameter.
Return value
TRUE indicates success. FALSE indicates failure
GetDeviceSKUID
Syntax
BOOL GetDeviceSKUID(TCHAR* lpszID)
lpszID
Description
This function will get the product SKU ID of this device.
Parameters
lpszID
[out] The pointer to a string with allocated memory of 5 characters wide string at least.
Return value
TRUE indicates success. FALSE indicates failure
GetLanguageID
Syntax
BOOL GetLanguageID(TCHAR* lpszID)
lpszID
int GetLanguageID(TCHAR* lpszID, DWORD dwSize) For PS336
Description
This function will get the product language ID of this device.
Parameters
lpszID
[out] The pointer to a string with allocated memory of 5 characters wide string at least.
dwSize
[in] The buffer size of lpszID.
lpszID
Return value
TRUE indicates success. FALSE indicates failure
Buffer size for PS336
GetOSVersion
Syntax
BOOL GetOSVersion(TCHAR* lpszVersion, DWORD dwSize)
BOOL GetOSVersion(TCHAR* lpszVersion)
lpszVersion for MH132
Description
This function will get the version string of OS platform of this device.
Parameters
lpszVersion
[out] The pointer to a string with allocated memory of 30 characters wide string at least
.
dwSize
[in] The buffer size of lpszVersion,
lpszVersion must bigger than 30. MH132 doesn’t have this
parameter.
Return value
TRUE indicates success. FALSE indicates failure
GetROMImageVersion
Syntax
BOOL GetROMImageVersion(TCHAR* lpszVersion, DWORD dwSize)
BOOL GetROMImageVersion(TCHAR* lpszVersion)
lpszVersion for MH132
Description
This function will get the version string of ROM Image of this device.
Parameters
lpszVersion
[out] The pointer to a string with allocated memory of 30 characters wide string at least.
dwSize
[in] The buffer size of lpszVersion,
lpszVersion must bigger than 30. MH132 doesn’t have this
parameter.
Return value
TRUE indicates success. FALSE indicates failure
GetROMImageVersionMinor
Syntax
BOOL GetROMImageVersionMinor(TCHAR* lpszVersion,
lpszVersion, DWORD dwSize)
Description
This function will get the minor version string of ROM Image of this device.
Parameters
lpszVersion
[out] The pointer to a string with allocated memory of 10 characters wide string at least.
dwSize
[in] The buffer size of lpszVersion,
lpszVersion must bigger than 10.
Return value
TRUE indicates success. FALSE indicates failure
GetOSImgVersion
Syntax
int GetOSImgVersion(char* pVersionInfo, DWORD dwSize)
Description
This function will get the PS236 R02 version string of ROM Image of this device.
Parameters
lpszVersion
[out] The pointer to a string with allocated memory of 10 characters wide string at least.
dwSize
[in] The buffer size of lpszVersion,
lpszVersion must bigger than 10.
Return value
TRUE indicates success. FALSE indicates failure
GetMicroPVersion
Syntax
BOOL GetMicroPVersion(TCHAR* lpszVersion)
lpszVersion
Description
This function will get the version string of Micro
Micro-controller
controller firmware of this device.
Parameters
lpszVersion
[out] The pointer to a string with allocated memory of 10 characters wide string at least.
Return value
TRUE indicates success. FALSE indicates failure
GetPhoneVersion
Syntax
BOOL GetPhoneVersion(TCHAR* lpszVersion, DWORD dwSize)
BOOL GetPhoneVersion(TCHAR* lpszVersion)
lpszVersion for MH132
Description
This function will get the version string of WCDMA firmware of this device.
Parameters
lpszVersion
[out] The pointer to a string with allocated memory of 10 characters wide string at least.
dwSize
[in] The buffer size of lpszVersion,
lpszVersion must bigger than 10. MH132 doesn’t have this
parameter.
Remark
This API is supported in Phone SKU (ID = 50) only.
Return value
TRUE indicates success. FALSE indicates failure
GetSerialNumber
Syntax
BOOL GetSerialNumber(TCHAR* lpszSN, DWORD dwSize, DWORD dwMode) for PS236
R07 / PS236 EXT / PS336
BOOL GetSerialNumber(TCHAR* lpszSN, DWORD dwSize) for MH132 and PS236 R02
Description
This function will get the serial number string of this device.
Parameters
lpszSN
[out] The pointer to a string with allocated memory of 20 characters wide string at least.
dwSize
[In] Allocated buffer size of lpszSN. Upper layer application has to allocate enough
memory buffer for usage. This value must be greater or equal to 8.
dwMode
[In] dwMode = 0, get PCB SN. dwMode = 1, dwSize = 10, get System
System SN. Only for
PS236 R07 / EXT / PS336
PS336.
Return value
TRUE indicates success. FALSE indicates failure
GetBluetoothMAC
Syntax
BOOL GetBTMac(BYTE* pBTMac, BYTE dwSize)
BOOL GetBluetoothMAC(TCHAR* lpszMAC)
lpszMAC for MH132
Description
This function will get the Bluetooth MAC address string of this device.
Parameters
lpszMAC
[out] The pointer to a string with allocated memory of 20 characters wide string at least.
For MH312.
pBTMac
[out] The pointer
inter to a 6 bytes array to indicate the BT MAC.
dwSize
[in] size = 6.
Remark
This API is supported in Bluetooth module integrated device only.
Return value
TRUE indicates success. FALSE indicates failure
GetWLANMAC
Syntax
BOOL GetWLANMAC(BYTE* pWLANMac, BYTE dwSize)
BOOL GetWLANMAC(TCHAR* lpszMAC)
lpszMAC for MH132
Description
This function will get the WLAN MAC address string of this device.
Parameters
lpszMAC
[out] The pointer to a string with allocated memory of 20 characters wide string at least.
dwSize
[in] The buffer size of lpszMAC,
lpszMAC must bigger than 20. MH132 doesn’t have this
Remark
This API is supported in WLAN module integrated device only.
Return value
TRUE indicates success. FALSE indicates failure
GetMemoryStatus
Syntax
BOOL GetMemoryStatus(MEM_STATUS* lpNAND, MEM_STATUS* lpRAM
lpRAM)
Description
This function will get the memory status of the device.
Parameters
lpNAND
[out] The pointer to a MEM_STATUS structure includes total NAND size and available
size.
lpRAM
[out]] The pointer to a MEM_STATUS
MEM structure includes total RAM size and available
size.
Return value
TRUE indicates success. FALSE indicates failure
Typedef struct {
DWORD dwTotalSize;
DWORD dwAvailable;
} MEM_STATUS, *PMEM_STATUS;
MEM_STATUS* lpNAND;
MEM_STATUS* lpRAM;
GetMemoryStatus(lpNAND, lpRAM);
Date: 2013/3/14
Getac Handheld Device
Page: 54
Software Development Kit
Total: 79
GetProcessorName
Syntax
int GetProcessorName(TCHAR* lpszName, DWORD dwSize)
BOOL GetProcessorName(TCHAR* lpszName)
lpszName for MH132
Description
This function will get the string of the chip vendor and model of this device. User must
allocate enough memory for 30 characters wide string at least.
Parameters
lpszName
[out] The pointer to a string with allocated memory of 30 characters wide string at least.
dwSize
[in] The buffer size of lpszName,
lpszName must bigger than 30. MH132 doesn’t have this
Return value
Return a integer indicates its name length for PS236.
TRUE indicates success. FALSE indicates failure for MH132.
GetIMEI
Syntax
BOOL GetIMEI(TCHAR* lpszIMEI, DWORD dwSize)
BOOL GetIMEI(TCHAR* lpszIMEI)
lpszIMEI for MH132
Description
This function will get the IMEI string of this device. User must allocate enough memory for
30 characters wide string at least.
Parameters
lpszIMEI
[out] The pointer to a string with allocated memory of 30 characters wide string at least.
dwSize
[in] The buffer size of lpszIMEI,
lpszIMEI must bigger than 30. MH132 doesn’t have this
Return value
TRUE indicates success. FALSE indicates failure
GetCPUSpeed
Syntax
BOOL GetCPUSpeed(DWORD* Speed)
Description
This function will get the CPU speed of system.
Parameters
Speed
[out] A double word pointer for CPU speed.
Return value
TRUE indicates success. FALSE indicates failure
SystemReboot
Syntax
void SystemReboot(void)
Description
Reboot System.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
GetOwnerName
Syntax
BOOL GetOwnerName(TCHAR* lpszName, DWORD dwSize)
BOOL GetOwnerName(TCHAR* lpszName)
lpszName for MH132
Description
This function will get the name string of the owner of this device. User must allocate enough
memory for 40 characters wide string at least.
Parameters
lpszName
[out] The pointer to a string with allocated memory of 40 characters wide string at least.
dwSize
[in] The buffer size of lpszName,
lpszName must bigger than 40. MH132 doesn’t have this.
Return value
TRUE indicates success. FALSE indicates failure
GetOwnerCompany
Syntax
BOOL GetOwnerCompany(TCHAR* lpszName, DWORD dwSize)
BOOL GetOwnerCompany(TCHAR* lpszName)
lpszName for MH132
Description
This function will get the name string of the owner company of this device. User must allocate
enough memory for 40 characters wide string at least.
Parameters
lpszName
[out] The pointer to a string with allocated memory of 40 characters wide string at least.
dwSize
[in] The buffer size of lpszName,
lpszName must bigger than 40. MH132 doesn’t have this.
Return value
TRUE indicates success. FALSE indicates failure
GetOwnerAddress
Syntax
BOOL GetOwnerAddress(TCHAR* lpszAddress, DWORD dwSize)
BOOL GetOwnerAddress(TCHAR* lpszAddress)
lpszAddress for MH132
Description
This function will get the name string of the owner company of this device. User must allocate
enough memory for 128 characters wide string at least.
Parameters
lpszAddress
[out] The pointer to a string with allocated memory of 128 characters wide string at least.
dwSize
[in] The buffer size of lpszAddress,
lpszAddress must bigger than 128. MH132 doesn’t have this.
Return value
TRUE indicates success. FALSE indicates failure
GetOwnerTelephone
Syntax
BOOL GetOwnerTelephone(TCHAR* lpszTel, DWORD dwSize)
BOOL GetOwnerTelephone(TCHAR* lpszTel
lpszTel) for MH132
Description
This function will get the string of the owner telephone of this device. User must allocate
enough memory for 30 characters wide string at least.
Parameters
lpszTel
[out] The pointer to a string with allocated memory of 30 characters wide string at least.
dwSize
[in] The buffer size of lpszTel,
lpszTel must bigger than 30. MH132 doesn’t have this.
Return value
TRUE indicates success. FALSE indicates failure
GetOwnerEMail
Syntax
BOOL GetOwnerEMail(TCHAR* lpszEMail, DWORD dwSize)
BOOL GetOwnerEMail(TCHAR* lpszEMail
lpszEMail) for MH132
Description
This function will get the string of the owner ee-mail address of this device. User must allocate
enough memory for 54 characters wide string at least.
Parameters
lpszEMail
[out] The pointer to a string with allocated memory of 54 characters wide string at least.
dwSize
[in] The buffer size of lpszEMail,
lpszEMail must bigger than 54. MH132 doesn’t have this.
Return value
TRUE indicates success. FALSE indicates failure
Button_SetFNKeyStatus
Syntax
BOOL Button_SetFNKeyStatus(BOOL bLock
bLock)
Description
This function will allow user to lock or unlock the FN button in the application.
Parameters
bLock
[in] Boolean TRUE to lock the FN button to enable alternately keyboard function.
FALSE to unlock the FN button and the keyboard function will back to normal setting.
Return value
TRUE indicates success. FALSE indicates failure
Button_GetFNKeyStatus
Syntax
BYTE Button_GetFNKeyStatus(void)
Button_GetFNKeyStatus(void
Description
This function will allow user to check the status of FN button in the application.
Parameters
None
Return value
1 indicates FN key is locked. 0 indicates unlock.
SetExpansionUART
Syntax
BOOL SetExpansionUART(BOOL bMode)
bMode
Description
This function will allow user to inform system switching the UART port between the
Flexiconn UART port or the bottom side UART port.1
Parameters
bMode
[in] Boolean
TRUE to set the bottom side UART port to the upper side Flexiconn UART port.
FALSE to set the Flexiconn UART port back to bottom side UART port.
Return value
TRUE indicates success. FALS
FALSE indicates failure
1
No matter using upper side Flexiconn UART port or bottom side UART, from software developer point of view, it is
“COM1:” in the system.
Date: 2013/3/14
Getac Handheld Device
Page: 66
Software Development Kit
Total: 79
GetExpansionUART
Syntax
BOOL GetExpansionUART(BYTE* lpMode)
lpMode
Description
This function will allow user to check the status of which UART port can be used in current
system configuration.
Parameters
lpMode
[out] pointer to a byte
*lpMode = 0; means the system configuration has been switched to the bottom side
External UART
*lpMode=1; means the system configuration has been switched the upper side Flexiconn
UART port.
Return value
TRUE indicates success. FALSE indicates failure
SetExpansionPOWER
Syntax
BOOL SetExpansionPOWER(BOOL bEnable)
Description
This function will enable the power for Flexiconn port device.
Parameters
bMode
[in] Boolean
TRUE to enable the power for Flexiconn port.
FALSE to disable the power of Flexiconn port.
Return value
TRUE indicates success. FALSE indicates failure
GetExpansionPOWER
Syntax
BOOL GetExpansionPOWER(DWORD*
GetExpansionPOWER( bEnable) For PS336
BOOL GetExpansionPOWER(BOOL*
GetExpansionPOWER( bEnable) For PS236EXT,PS236R07
Description
This function will allow user to check the power status of Flexiconn port.
Parameters
lpEnable
[out] Boolean
0, means the power of Flexiconn port is OFF.
1; means the power of Flexiconn port is ON.
ON
Return value
TRUE indicates success. FALSE indicates failure
IsUsingAABattery
Syntax
BOOL IsUsingAABattery(void)
Description
This function can get if using AA battery.
Parameters
None
Return value
TRUE indicates using AA battery.
battery FALSE indicates not using AA battery.
CreateThread(NULL,
eateThread(NULL, 0, HookThread, &g_hInst, 0, &dwThreadID)
DeactivateKBHook();
return 1
}
BOOL DeactivateKBHook()
{
//unload the hook
if(g_hInstalledLLKBDhook != NULL)
{
UnhookWindowsHookEx(g_hInstalledLLKBDhook);
g_hInstalledLLKBDhook = NULL;
}
Microsoft Windows Mobile Operation System has provided the “Autorun” feature to assist
user executing specific application automatically. To take the advantage of this feature,
please follow these steps to configure your SD card.
7.2
.2 How can I rotate the system screen thru my application?
For some specific scenarios, landscape mode might be a better mode to provide
information to the end user. Microsoft Windows Mobile Operation System has provided
“Screen Rotation” feature as part of it. To implement this feature into your application,
please refer to the implementation guide on the Microsoft MSDN website.
http://msdn.microsoft.com/en-us/library/ms911017.aspx
us/library/ms911017.aspx
Date: 2013/3/14
Getac Handheld Device
Page: 75
Software Development Kit
Total: 79
7.3
.3 How can I pack my applications and settings for multiple units’ deployment?
For some Enterprise users, the easier way to deploy specific application and related
system settings into Windows Mobile device is creating a “Customized Cab file”.
Microsoft has provided this feature in Visual Studio 2005/2008 and makes the Cab file
creation easily.
Please refer to the MSDN website for detail information.
http://msdn.microsoft.com/en-us/library/bb158529.aspx
us/library/bb158529.aspx
Date: 2013/3/14
Getac Handheld Device
Page: 76
Software Development Kit
Total: 79
7.4 How can I keep the unit awake if specific application running?
Syntax
void WINAPI SystemIdleTimerReset(void);
Parameter
None.
Return
None
Notes
This function must be use appropriately. On battery-powered
battery devices, a program that
never suspends (or sleeps) by continually calling SystemIdleTimerReset can quickly
drain the batteries.
Date: 2013/3/14
Getac Handheld Device
Page: 77
Software Development Kit
Total: 79
2
For MH132, G-Sensor
Sensor is initialized in system boot, developer need not to do this.
3
GPS without GPS Intermediate Driver,, For PS236/PS236EXT, please use COM4; For PS535F/PS535E, please use COM2;
When develop with MH132, please use COM7
Date: 2013/3/14
Getac Handheld Device
Page: 78
Software Development Kit
Total: 79
GetWLANMAC X ○ ○ X X ○ ○
GetMemoryStatus X ○ ○ X X ○ ○
GetProcessorName X ○ ○ X X ○ ○
GetIMEI X ○ ○ X X ○ ○
GetCPUSpeed ○ ○ ○ X X X ○
SystemReboot ○ ○ ○ X X X ○
GetOwnerName X ○ ○ X X ○ ○
GetOwnerCompany X ○ ○ X X ○ ○
GetOwnerAddress X ○ ○ X X ○ ○
GetOwnerTelephone X ○ ○ X X ○ ○
GetOwnerEMail X ○ ○ X X ○ ○
Button_SetFNKeyStatus X ○ ○ X X X ○
Button_GetFNKeyStatus X ○ ○ X X X ○
SetExpansionUART X ○ ○ X X X X
GetExpansionUART X ○ ○ X X X X
SetExpansionPOWER X ○ ○ X X X ○
GetExpansionPOWER X ○ ○ X X X ○
IsUsingAABattery X ○ ○ X X X X
Date: 2013/3/14
Getac Handheld Device
Page: 79
Software Development Kit
Total: 79