background image

 
 

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 

14 / 65 

3  C++ programming with Visual Studio 

3.1  SDK – Software Development Kits for ACD devices 

 
SDKs define the functionality of the custom-compiled CE kernel installed on the CE devices. They are 
provided separately by ACD according to the Windows CE / device classes. 
 

3.1.1  Installation 

 
All the required SDKs are available on the ACD developer CD. A distinction is made between Windows CE 
5 / 6 and ACD device (SE / non-SE). 
 
Make sure during installation that the installation file is installed locally on the PC with administrator rights
If you install SDKs without assigning administrator rights, this will not necessarily prompt error messages yet 
the SDK cannot be integrated into Visual Studio. 
 
As a rule, Visual Studio should be programmed to run with administrator rights only in order to avoid 
unnecessary side effects caused by unauthorised events that could result in incorrect debugging behaviour. 
 

3.2  Creating a project 

 
This chapter outlines the steps involved in creating a new project. The integrated Help functions also provide 
separate descriptions of IDE. 
 
Launch IDE and create a new project: 
 

 

 
Select Smart Device project type and template, e.g. MFC Application: 
 

 

Содержание M215SE

Страница 1: ...Programming Instructions ACD Windows CE Second Edition Devices Version 3 00 Copyright ACD Gruppe This document may not be duplicated or made accessible to third parties without permission...

Страница 2: ...fining the Windows CE version 18 4 C programming with Visual Studio 19 4 1 Installation 19 4 2 Creating a project 19 4 3 Deployment 20 4 4 Generating codes and debugging 20 4 4 1 Project subfolder 21...

Страница 3: ...boot loader 50 6 1 2 5 Replacing the boot bitmap 50 6 1 2 6 Updating the flash disk 50 6 1 2 7 Updating the keyboard controller and PLD 50 6 2 Generating and rendering links 51 6 2 1 Manually creatin...

Страница 4: ...eparate documentation is available for certain topics Reference to this documentation will be made in the text The relevant documentation is available from ACD on request or can be found on the separa...

Страница 5: ...vers folder Some of the devices also feature a microcontroller module keyboard controller and programmable logic gate PLD These devices have been programmed by ACD accordingly and can be automatically...

Страница 6: ...ls Save Registry Without persisting the registry changes made during runtime will be lost This significantly improves the stability of the entire system Storage Memory This RAM area is allocated for v...

Страница 7: ...is initiated and Windows CE initialises In the memory division of the persistent registry a search starts for a valid registry signature If this signature is found the data is copied to the RAM and us...

Страница 8: ...flashdisk system devctl exe file status bar The file launches automatically immediately after booting It is responsible for Evaluating the battery status Evaluating and processing keyboard events Proc...

Страница 9: ...as managed NET applications They include the following functions Battery level indicator and status Keyboard alphabetic key keylock handling keyboard mapping Display lighting brightness dimming behav...

Страница 10: ...ong range sensor System Windows CE 6 0 NET Version Compact Framework 3 5 Display TFT Display 3 5 240 x 320 pixels Processor Intel XScale PXA166 800 MHz Memory 512 MB Flash 256 MB DDR RAM Larger memory...

Страница 11: ...drivers even if the Windows Mobile Device Centre has already been installed Due to today s restrictions in enterprise LAN s the downloading of the driver will probably fail Solution Depending on the...

Страница 12: ...heckboxes to select which types of information should be synced It is generally recommended to disable all checkboxes This step completes the configuration The selected types of information and files...

Страница 13: ...rograms This option also enables users to call up programs that use RAPI functions to access the connected Windows CE device from the PC 2 4 RAPI functions When the Windows CE device is connected to t...

Страница 14: ...allation file is installed locally on the PC with administrator rights If you install SDKs without assigning administrator rights this will not necessarily prompt error messages yet the SDK cannot be...

Страница 15: ...t will open to help you configure the project In the wizard first select the target platform You can also add the ACD SDKs to the project Once you have configured the project settings press Finish to...

Страница 16: ...n execute it Similar to desktop PC applications these applications also provide debugging tools breakpoints variables view memory view etc Click the relevant icon on the developer bar to also launch t...

Страница 17: ...ersion functions are also available between Unicode and ANSI Function Description wcstombs Converts wide character string into multibyte string mbstowcs Converts multibyte string into wide character s...

Страница 18: ...indows CE version To compile CE to be platform dependent this or a similar define block can be added if _WIN32_WCE 0x600 Windows CE 5 0 else Windows CE 6 0 endif If the CE version is to be defined in...

Страница 19: ...recommended to install the latest patches and service packs onto the developer PC to ensure that the most recent libraries are used Compact Framework 3 5 http www microsoft com downloads de de detail...

Страница 20: ...when you created the project is installed every time you reboot the device This can lead to longer waiting times This can also have the effect that the developer and rollout versions differ If you ha...

Страница 21: ...comfortably delete some of the obj directory contents that can become extremely large as it only contains temporary files 4 4 2 DeveloperPack The DeveloperPack is a collection of various libraries wit...

Страница 22: ...es Add Reference 4 4 2 1 Versions The DeveloperPack is available for Compact Framework 3 5 as well as for Compact Framework 2 0 4 4 2 2 Reference sources The DeveloperPack is saved on the ACD develope...

Страница 23: ...ult REG files will be imported and stored persistently in the registry If available the update batch files UpdateCE bat applications and Sysupdate bat system components are also called from ACDinit ba...

Страница 24: ...the list The button is used to add new options In this dialogue box you can select a new option from a list of standard programs The option is added to the STARTUP list and can be activated there A sp...

Страница 25: ...e APIs of the above mentioned device 5 3 Battery functions The acddev dll application is responsible for battery management In combination with the DevCtl exe system application it determines the batt...

Страница 26: ...spend is entered in the Registry at HKEY_LOCAL_MACHINE System CurrentControlSet Control Power Timeouts in the ACSuspend or BattSuspend parameters This differentiates between the suspend behaviour in A...

Страница 27: ...cessible with the shift key example s_8 for shift key 8 For more detailed information on the features one finger operation alphabetic keyboard keyboard beep and lock please consult the administration...

Страница 28: ...ed automatically when booting the devices It immediately takes control of the integrated scanner module and configures the module with the settings in the default configuration file Its name is read f...

Страница 29: ...xternal scanner ExtScan2KeyCE External laser scanners from a variety of manufacturers can be connected to Windows CE devices Non customised applications use a scan data insert function in the keyboard...

Страница 30: ...to use the scanner API 5 7 2 1 Scanner DLLs on the Windows CE devices Two Win32 DLLs scan dll and scanapi dll are installed on Windows CE devices The first DLL contains the hardware dependent part of...

Страница 31: ...ERED_MESSAGE uScannerMsg OnScannerMsg END_MESSAGE_MAP Process scanner message afx_msg LRESULT CMyAppDlg OnScannerMsg WPARAM wParam LPARAM lParam switch wParam case SC_MAKE Code scanner key pressed bre...

Страница 32: ...he previous default configuration if the application changed the scanner configuration settings In comparison to the old scanner solution the ScanAPI dll has been extended new ScanAPI dll It allows ap...

Страница 33: ...s can be integrated into a mobile device 5 8 2 How to use the RFID module Application developers can directly use RFID API in the RFIDApi dll It is available from ACD This DLL is integrated into the a...

Страница 34: ...function Parameter Description RFIDInit dwCardFamily CARDFAMILY_MIFARE nRecvTimeout 5000 nPowerDownTimeout 0 fErrorResult TRUE Return of RFID handle Initialisation RFIDLoadKey Transfer of RFID handle...

Страница 35: ...RFID handle Tag 0x9C 4B 23 D2 lpbCardSize 0x08 1 KB card fRequest TRUE Select a transponder card RFIDReadSector Transfer of RFID handle Tag 0x9C 4B 23 D2 nSector 11 lpbData Block 0 16 Bytes 0x00 0x00...

Страница 36: ...ful functions for RFID readers installed in ACD devices include windows h include tchar h include stdio h include conio h include RfidApi h HRFID g_hRfid void DspError void RES Res Get last error RFID...

Страница 37: ...cpy lpbHlp lpabBuf nSize for int i 0 i nSize i lpabBuf i lpbHlp nSize 1 i free lpbHlp return TRUE int main int argc char argv BYTE abReadBlockData SIZE_ONEBLOCK_MIF UINT nFoundCards nCards LONG lResul...

Страница 38: ...esult RFID_SUCCESS return RetDspError Read out block 0 nSize sizeof fromReadBlockData lResult RFIDReadBlock g_hRfid Tag nCards 0 fromReadBlockData nSize TRUE if lResult RFID_SUCCESS return RetDspError...

Страница 39: ...f nFoundCards 0 Show transponder addresses ShowCards Tag 0 nFoundCards for nCards 0 nCards nFoundCards nCards Select transponder cards lResult RFIDSelectCard g_hRfid Tag nCards bCardSize TRUE if lResu...

Страница 40: ...e two ways of using this function Unloading WLAN network devices if you want to use LAN devices via a docking station and only one connection may be active at the same time Unloading a network device...

Страница 41: ...ject Model COM interfaces to build a custom browser or to add browser controls to an application Alternatively you can use the Internet Explorer container IESample to create a browser designed specifi...

Страница 42: ...umber of elements 4 KB maximum each set by registry Persistent depending on the OEM implementation Protocols IPv4 IPv6 HTTP 1 1 http https FTP file TLS Extensible Markup Language XML MSXML Parser 3 0...

Страница 43: ...rers 6 desktop version provides The IESimple program is a browser designed for full screenapplication for Windows CE terminals M210 M260 M210SE M260SE M215SE from the ACD Group Besides rendering the W...

Страница 44: ...it maintains compatibility with JavaScript Additional Microsoft specific features have been added to JScript Only Internet Explorer fully supports JScript Mozilla and Opera have however implemented a...

Страница 45: ...secure This chapter explains which system components on the ACD devices can be updated It also describes how these devices are updated 6 1 1 Updating system components ACD Windows CE devices are prima...

Страница 46: ...te installation is interrupted because the power supply is too low this can cause serious damage to the device Make sure that the battery is fully charged before you launch the update 6 1 2 1 How to c...

Страница 47: ...rd clicks into position M210SE The slot for the SD card cannot be accessed directly It is hidden underneath the top rubber cap This can be removed carefully by loosening the 4 screws Note Be careful a...

Страница 48: ...ppear on the screen The device may perform a reboot Calibrate the touchscreen and press the Enter key to confirm Skip the DC loader message Disable the checkbox next to Update Lan then tap Start M210S...

Страница 49: ...kip the test configuration Skip the FTP setup Reboot the device The device displays the desktop below once flashing is complete Then execute CEReboot this will complete the firmware update Enter 00 an...

Страница 50: ...system and drivers folders to the device Delete the registry with Start Programs SysTools SysTools Reboot the device with Start Programs ACD System CEReboot Run any update batches on the desktop Delet...

Страница 51: ...evices Tap with the stylus on the program or folder icon to highlight it Hold the stylus in position until the pop up dialogue box opens Then tap Copy in this box Tap with the stylus on a free space i...

Страница 52: ...nks The links will still function 6 2 4 Restoring links on device boot The Windows Desktop and Windows Programs folders contain links on the desktop or in the start menu on Windows CE devices Some of...

Страница 53: ...m library dll which you want to replace is closed first or that the old files are renamed first functions under Windows CE when device is running When doing so the following is recommended Programs ar...

Страница 54: ...o start the installation A dialogue box then appears where you can select the installation folder The CAB files provided by ACD should be extracted into the pre defined folders Once the installation i...

Страница 55: ...s Save Registry 6 3 4 3 CAB file installation when booting The mechanism described in chapter 6 3 3 is particularly suitable for extracting CAB files when booting To do this copy the UpdateCE bat file...

Страница 56: ...rs For example some graphic FTP clients will shorten Microsoft Remote Display Control to simply Control 6 4 1 1 Avoiding display problems with file names in Total Commander For the correct display of...

Страница 57: ...in the AllowAnonymous option default 0 The server service is disabled on the next reboot with the IsEnabled option set to 0 default 1 6 4 1 4 Software update with CE proprietary FTP servers Any FTP cl...

Страница 58: ...booted bye Logs out and closes FTP connection Table 12 FTP script file 6 4 2 FTP client function Windows CE device as client In addition to the FTP server service the FTPSimple program separate docume...

Страница 59: ...enter the name or IP address of the FTP server without a space character uUser Behind u enter the user name without a space character that was configured in the FTP server pPassword Behind p enter th...

Страница 60: ...on and configured with the appropriate parameters 3 Double tap the icon of an FTP script file to manually launch FTP download 4 Execute a batch to manually launch FTP download Example of an update bat...

Страница 61: ...t image is displayed once the kernel has booted in order to bridge the initialisation time where users can access the desktop It also acts as a platform to insert your own company s logo Without a cus...

Страница 62: ...e before the first command in the command line is run If this command is defined on its own the CEToolBox waits until the waiting time has elapsed and then closes x time in milliseconds ms Hides task...

Страница 63: ...utoWakeup flag of TC which leads to an automatic switch on after suspend as long as the device is in suspend mode suspend immediate wakeup Starts stops Bluetooth device btdevicestart btdevicestop Stop...

Страница 64: ...atus 8 25 26 Bluetooth 11 Boot image 7 Boot Bitmap 50 Booting 7 Bootloader 7 45 50 CAB file 54 55 CE kernel 7 45 CeAppMgr exe 54 CEToolBox 9 62 Company logo 61 Data exchange 11 Desktop 52 61 dev ini 2...

Страница 65: ...61 Start menu 52 StartConfig 7 24 Startup 23 24 53 Status bar 8 25 Storage Memory 6 Suspend 8 25 26 Syncing 11 12 System memory division 6 Time 12 Unicode 17 Update 45 53 57 60 UpdateCE bat 53 55 USB...

Отзывы: