ACD GRUPPE M215SE Installation manual

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.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 2 / 65
Contents
Contents............................................................................................................. 2
1
Overview...................................................................................................... 4
1.1
Windows CE on ACD devices .................................................................................... 4
1.1.1
Flash memory .............................................................................................................6
1.1.2
The RAM memory.......................................................................................................6
1.1.3
Distinction between volatile / permanent memory.......................................................6
1.1.4
System startup............................................................................................................7
1.2
ACD functions............................................................................................................. 8
1.2.1
Status bar (DevCtl.exe)...............................................................................................8
1.2.2
System library acddev.dll............................................................................................9
1.3
Overview of ACD Windows CE devices ................................................................... 10
2
Mobile Device Centre................................................................................. 11
2.1
Versions.................................................................................................................... 11
2.2
Partnerships.............................................................................................................. 12
2.3
ActiveSync registry entries........................................................................................ 12
2.4
RAPI functions .......................................................................................................... 13
3
C++ programming with Visual Studio......................................................... 14
3.1
SDK – Software Development Kits for ACD devices................................................ 14
3.1.1
Installation.................................................................................................................14
3.2
Creating a project...................................................................................................... 14
3.3
Generating codes and debugging............................................................................. 16
3.3.1
Project subfolder.......................................................................................................16
3.4
Notes, recommendations, advice ............................................................................. 17
3.4.1
General.....................................................................................................................17
3.4.2
Unicode is standard ..................................................................................................17
3.4.3
Defining 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
4.4.2
DeveloperPack..........................................................................................................21
4.4.2.1
Versions....................................................................................................................22
4.4.2.2
Reference sources....................................................................................................22
4.4.2.3
Examples ..................................................................................................................22
5
Important software interfaces and device functions ................................... 23
5.1
Startup process and autostart options...................................................................... 23
5.1.1
ACDInit.bat................................................................................................................23
5.1.2
STARTUP.BAT .........................................................................................................23
5.1.3
AutoApp.bat / AutoApp.exe.......................................................................................23
5.1.4
STARTUP configuration............................................................................................24
5.2
Device API ................................................................................................................ 24
5.3
Battery functions ....................................................................................................... 25
5.4
Power management.................................................................................................. 26
5.5
Display and backlight................................................................................................ 26
5.6
Keyboard................................................................................................................... 27
5.7
Scanner module........................................................................................................ 28
Scanner types........................................................................................................................28
ScanDrv scanner driver.........................................................................................................28
Types of use for the scanner module ....................................................................................28
5.7.1
Internal and external scan data insertion ..................................................................29
5.7.1.1
Inserting data from the internal scanner (ScanDrv)...................................................29
5.7.1.2
Inserting data of an external scanner (ExtScan2KeyCE) ..........................................29
5.7.1.3
Basic initialisation of an external scanner .................................................................30
5.7.1.4
Closing ExtScan2KeyCE...........................................................................................30

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 3 / 65
5.7.2
How to use the scanner API......................................................................................30
5.7.2.1
Scanner DLLs on the Windows CE devices..............................................................30
5.7.2.2
Triggering a scan from the application......................................................................31
5.7.2.3
The callback function ................................................................................................31
5.7.2.4
ScanDrv functional scheme on M2xxSE devices......................................................32
5.8
RFID.......................................................................................................................... 33
5.8.1
RFID types................................................................................................................33
5.8.2
How to use the RFID module....................................................................................33
5.8.3
Sequence programming with DLL RFIDApi ..............................................................33
5.8.4
Example program......................................................................................................36
5.9
WLAN and Ethernet.................................................................................................. 40
5.9.1
ndisconfig..................................................................................................................40
5.10
Internet Explorer for Windows CE ............................................................................ 41
5.10.1
Internet Explorer 6 characteristics for Windows CE..................................................41
5.10.2
IE6 browser characteristics for Windows CE.............................................................42
5.10.3
Internet Explorer 6 architecture.................................................................................43
5.10.4
IESample or IESimple...............................................................................................43
5.10.5
JScript.......................................................................................................................44
6
Managing ACD devices.............................................................................. 45
6.1
Updating the system................................................................................................. 45
6.1.1
Updating system components...................................................................................45
6.1.2
Updating the device firmware....................................................................................46
6.1.2.1
How to check the firmware version ...........................................................................46
6.1.2.2
Firmware update requirements.................................................................................46
6.1.2.3
Step-by-step installation (automatic sequence).........................................................47
6.1.2.4
Replacing the 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 creating links..............................................................................................51
6.2.2
Creating links in the program ....................................................................................51
6.2.3
Creating links with an editor......................................................................................52
6.2.4
Restoring links on device boot..................................................................................52
6.3
Installing software..................................................................................................... 53
6.3.1
Installing from the IDE by the programmer................................................................53
6.3.2
xcopy installation.......................................................................................................53
6.3.3
Program update / installation when booting..............................................................53
6.3.4
Installing with CAB files.............................................................................................54
6.3.4.1
Manual CAB file installation.......................................................................................54
6.3.4.2
CAB file installation via the MobileDeviceCentre.......................................................54
6.3.4.3
CAB file installation when booting.............................................................................55
6.4
FTP server / client..................................................................................................... 56
6.4.1
FTP server service (Windows CE device as server).................................................56
6.4.1.1
Avoiding display problems with file names in Total Commander...............................56
6.4.1.2
Setting the password.................................................................................................56
6.4.1.3
Setting the root directory and other parameters........................................................57
6.4.1.4
Software update with CE proprietary FTP servers....................................................57
6.4.2
FTP client function (Windows CE device as client)...................................................58
6.4.2.1
Software update with CE proprietary FTP client script..............................................60
6.5
Customising the startup screen................................................................................ 61
6.6
ACD assistant programs........................................................................................... 62
6.6.1
CEToolBox – collection of tools.................................................................................62

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 4 / 65
1 Overview
This document is a manual designed for programmers, system administrators and configurators of ACD
Windows CE devices.
It is intended to provide an insight into the functionality and features of these devices and is the first source
of information for questions on programming, configuration and administration.
Due to the complexity of today’s operating systems and their programming, this document cannot provide an
in-depth insight into all components. Separate 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 separately available development CD.
1.1 Windows CE on ACD devices
Windows CE in version 6.0 is currently installed on all mobile ACD handheld devices from the second
edition. Compact Framework 3.5 is available for the development of managed .NET applications:
Device Windows CE .NET Compact Framework
M210SE Windows CE 6.0 CF 3.5
M215SE Windows CE 6.0 CF 3.5
M260SE Windows CE 6.0 CF 3.5
Table 1 – Windows CE devices
To facilitate understanding, the standard Windows CE terminology is used consistently throughout the
document.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 5 / 65
Windows CE is a configurable set of OS components that are compiled and compressed into a monolithic
kernel. The OS components was configured when Windows CE was installed and changes can usually only
be done by configuring the included separate software packs.
On ACD devices, this scheme is not as strikt. The subsequent installation of user software and device
drivers is allowed in this case. This significantly increases the flexibility of an individual, well-tested basic
configuration.
Alongside the basic kernel, an ACD Windows CE device includes other components that are also relevant
for software development (see diagram below). The kernel also includes system programs and certain
drivers stored on a flash file system (\flashdisk\system folder and \flashdisk\drivers 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 updated
on request with a system update.
ACD Windows CE devices feature a processor module and the connected peripherals. The processor
module is configured with a processor with ARM technology. On second edition devices, this is
a Marvell/Intel processor of type PXA166 (XScale).
Peripherals also include RAM and non-volatile flash memory.
Note
Despite its similar name, Windows Embedded Compact (Windows CE) has
technically nothing in common with the desktop operating system offspring Windows
Embedded Standard/Enterprise. With the exception of certain basic .NET programs,
native desktop programs cannot run on Windows CE.
From a programmer’s perspective, although Win32 APIs are extremely similar in
their configuration, minor differences can significantly increase the time required for
a potential conversion to Windows CE.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 6 / 65
1.1.1 Flash memory
The flash memory stores all data that should be preserved when the device is powered down. The flash
memory is designed as a combination of two flash chips (Intel) with a total capacity of 512 MB.
1.1.2 The RAM memory
RAM technology is installed on the processor module as an internal memory. The RAM is divided into
several areas:
Kernel program code
This is where the kernel code is stored that is extracted by the flash when the device is booted. The system’s
response speed is therefore faster because the RAM (instead of the flash) is used to execute the kernel.
Registry
The registry occupies a small space on the RAM. It is used during system runtime and can be persisted
triggered by Start
Programs
SysTools
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 volatile file storage. It is stored as a file system layer on directories defined
specifically for the device (see Chapter 1.1.3).
Program Memory
Internal memory that can be used by programs. Program memory works like the RAM on desktop PCs.
1.1.3 Distinction between volatile / permanent memory
Device Directory characteristics
M210SE
M215SE
M260SE
All directories are permanent except:
•\tmp
Table 2 – Directory characteristics
Note
To set the division between storage memory and program memory, go to
Start
Settings
Control Panel
System
Memory.
The change cannot be persisted by saving the registry. Go to
Start
Programs
ACD
StartConfig and with the System memory division option
define the amount of storage memory that should be automatically allocated when
the device is booted
(in KB).

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 7 / 65
1.1.4 System startup
After switching on the device, the keyboard controller activates the voltage supply of the processor module.
The steps described below are then executed.
a) Starting the boot loader
The boot loader initializes the registry and sets internal processor states. The boot loader searches for boot
scripts (autoboot.bat) on the (optionally integrated) SD card and on locating a script, it will execute the script.
If it does not find an SD card, it executes the processor module’s autoboot.dat saved in the NAND flash.
b) Setting the display parameters and displaying the boot image
The autoboot.bat boot script in the CPU module NAND flash copies the display parameters to the processor
in a command line sequence and activates the display output.
A boot image (boot.bmp) is part of the file set for the SD card and is installed into the NAND memory when
the OS is flashed so that it can load the boot script with a regular start. The image is displayed during the
rest of the booting process.
c) Loading and starting the OS kernel
The NAND boot script file autoboot.bat then extracts the nk.nb0 kernel into the RAM memory. The entry
point of the CE kernel 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 used as the current registry. Changes are not copied
automatically back into the flash; this process has to be initialised explicitly (“Save Registry”).
If no valid registry is found, the default registry saved in the OS image is used instead.
Windows creates a ROM file system where the Windows files are mirrored. It is also possible here to create
other files in the file system that are then stored in the persistent flash file system.
Drivers for Windows (e.g. snmp), that are to be integrated later by the monolithic kernel, can be stored in the
\windows or \flashdisk\drivers folders.
d) Launching ACD system services
After initialisation, the kernel launches some ACD system programs. These are saved persistently in the
memory (e.g. the “status bar” or the scanner data insertion). A dynamic start screen (GuiCmd) visualises
the startup and automatically hides the desktop until the user program is fully initialised (see also Chapter
6.5) so that users cannot access the system during startup.
The StartConfig tool is used to define which functions are available in the device (see the administration
documentation).
Shortly after startup, important system parameters are displayed on the desktop to quickly guide users
through the OS.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 8 / 65
e) Launching user programs
User programs are launched at the end of the boot sequence with a customised batch \flashdisk\autoapp.bat
if this was configured in StartConfig.
Info: The autoapp.bat file is copied into the \flashdisk folder once the production process has been
completed successfully; the source is saved in \flashdisk\system\sysprep\custom. A template to create the
autoboot.bat file is also stored in this folder.
1.2 ACD functions
Once the kernel and device drivers have booted, an executable CE device is ready for use. Various
components such as the scanner or keypad require other system services as either libraries or applications.
These files are located in the directory \flashdisk\system.
1.2.1 Status bar (DevCtl.exe)
You can access central services from the \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
•Processing and coordinating application messages with suspend and shutdown
•Providing device information (version information, device names, serial numbers, power statuses etc.)
•Setting the display brightness
•Managing power save mechanisms (display dimming)
•Displaying the status bar with battery icon and clock at the bottom of the screen
Various status bar settings options can be defined in the configuration file \flashdisk\system\ini\dev.ini and
Windows Messages:
- Hide / show option
- Position
- Battery status
oCharging / discharging
oBattery level status
- Clock
oHours / minutes
oSeconds (optional)
- User-defined text
oBackground colour
oPosition
oSize
oFont
oFont colour
oNormal / bold
oFlashing
oAcoustic signal simultaneously to the text flashing
The status bar can access the functions of the central system library acddev.dll.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 9 / 65
1.2.2 System library acddev.dll
acddev.dll is located in \flashdisk\system. It pools together important basic functions that are used by the
status bar (see 1.2.1). These are available to other user programs.
To use the system library, the developer CD contains various interfaces for native applications as well 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 behaviour
•Device, version, serial number information
•Interaction option before suspend and shutdown
•Notification prompts with battery statuses, suspend / shutdown, scanner / RFID keystrokes
•Text option in the status bar
•Simplified registry and INI file processing functions
Some of the acddev functions are provided for batch programming with tools such as the CEToolBox.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 10 / 65
1.3 Overview of ACD Windows CE devices
M210SE M260SE M215SE
Description
Mobile data terminal with integrated scanner, touchscreen
and numeric keypad. Handheld terminal based
on M210SE with
integrated camera and
long-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 optionally available (SD card)
Scanner
1D scanner, optional 2D or long-range scanner -
Interfaces IrDA
- IrDA
USB Host / Slave
USB OTG USB Host / Slave
WLAN according to IEEE 802.11abg
3D acceleration sensor
optional:
SD card
RFID
Bluetooth
GSM
UMTS
Table 3 – Device overview

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 11 / 65
2 Mobile Device Centre
2.1 Versions
The Windows Mobile Device Centre (previously known as ActiveSync) is an application for data exchange,
deployment and debugging of the device.
It is also used as a communication protocol to contact development environments Visual Studio 2005 /
2008..
The PC software required is available free of charge from Microsoft as a download.
If Visual Studio 2005 / 2008 is used for development, an ActiveSync version from 4.0 upwards or the
Windows Mobile Device Centre must be installed. Parallel installation is not supported.
From Windows Vista / Windows 7 upwards, the Windows Device Centre must be used instead of
ActiveSync.
Note
The first time you connect an MDT device to a Windows 7 PC, you will need an
Internet connection to download 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 system, one of the two installation packs below must be installed:
Windows Mobile Device Centre 6.1 for Windows Vista (32-bit) or
Windows Mobile Device Centre 6.1 for Windows Vista (64-bit)
Note
On the Windows Mobile Device Centre and ActiveSync versions from 4.0 upwards, it
is no longer possible to sync devices via network / WLAN and this function has been
replaced by Bluetooth / USB synchronisation.
Note
Although network / WLAN synchronisation is no longer supported, it is still possible
to upload programs and execute remote debugging over network / WLAN. When you
open a project, the project must be uploaded once via a Windows Device Centre
connection.
If this connection is interrupted, the debugging session continues over network /
WLAN and a socket connection. The Windows Device Centre connection must not
be active.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 12 / 65
2.2 Partnerships
The first time a Windows CE device is connected to a PC, a dialogue box opens on the PC screen where
the user can choose to install a guest connection or a partnership between both devices.
This is repeated every time the device attempts to connect to the PC if a partnership has not been created
between both devices.
If the Guest option is selected, the Device Centre / ActiveSync window appears on the screen. Click the
Search button or File
Menu
Search to open an Explorer-like window to enable remote access to the
folders and files on the Windows CE device. This connection allows you to transfer data in both directions.
File syncing between both devices is not supported.
If the Partnership option is selected, you must enter a unique name for the device. This will replace the
device name on the Windows CE device.
Another dialogue box will then appear. In this box, confirm whether the device can enter a partnership with
another PC.
Another window then appears containing checkboxes 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 are then synced between both devices.
You can persistently save the partnership you have installed in the registry on the Windows CE device:
Start
Programs
SysTools
Save Registry.
When you now attempt to establish other connections, both devices and the time will be synced.
2.3 ActiveSync registry entries
Registry entries can influence the response behaviour of ActiveSync on the PC as well as on the
Windows CE devices. The entries in the registry can be viewed in the Microsoft Developer Network (see
also http://msdn2.microsoft.com).
You will find below a description of certain entries selected for the PC.
In most cases, it is unnecessary to install a partnership:
•If syncing is not required.
•If no network/WLAN connection is required or available.
•With serial devices for end customers rather than programmer devices.
In these cases, a prompt to establish a partnership or guest connection can disrupt users. This prompt can
be disabled with an entry in the registry.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services]
"GuestOnly"=dword:00000001

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 13 / 65
To autostart programs when connecting and disconnecting devices, two entries are added to the registry.
Examples:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE\Services\AutoStartOnConnect]
"GetData"="X:\\Tools\\GetData.exe X:\\Data"
"PutUpdate"="X:\\Tools\\PutUpdate.exe X:\\Update\\Update.CAB"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE\
Services\AutoStartOnDisconnect]
"HandleData"="X:\\Tools\\HandleData.exe X:\\Data"
As you can see, it is possible to enter several programs. 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 the PC, remote API functions are used by the program
running on the PC to directly access the Windows CE device. To do this, open Remote Procedure Calls on
the device. This allows access to the registry, the file system and to the device’s databases.
RAPI functions can be used to:
•Change the registry entries for device configuration
•Receive data recorded on the device
•Upload program and data updates
•Sync databases on the device and PC
For more information, consult the Microsoft Developer Network (MSDN).

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:

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 15 / 65
Once you have selected the project template, a wizard assistant 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 generate the project.
In the developer bar, select the binary you want to generate (Debug / Release) and the target SDK.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 16 / 65
3.3 Generating codes and debugging
A Windows Mobile Device Centre / ActiveSync connection is required between the developer PC and device
for the remote debugging of a program (see Chapter 2).
In the menu, select Build
Build Solution (Ctrl + Shift + B) to compile and create the application. If the
program is compiled and linked without any errors, it can then be transferred to the device with Build
Deploy Solution.
Select the Debug
Start Debugging (F5) menu to check the application, transfer it to the device and then
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 these functions.
No more information will be provided in this manual on the other IDE modules and debugging function. Basic
information can be found in the articles on the Microsoft homepage or in the IDE Help (F1).
3.3.1 Project subfolder
A separate directory is created in the project directory for each SDK you select. This subfolder is divided
further into Debug and Release:
•\ACD_TR6CE6_M210SE_2013Q3 (ARMV4I)\Debug
•\ACD_TR6CE6_M210SE_2013Q3 (ARMV4I)\Release
The generated programs and / or DLLs as well as temporary Visual Studio files are saved in these
subfolders.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 17 / 65
3.4 Notes, recommendations, advice
3.4.1 General
The kernels of Windows CE differ significantly from those of Desktop-Windows operating systems. The
functionalities differ, many functions are missing, react differently or are only partly installed.
This is particularly worth remembering when calculating the time and effort involved.
3.4.2 Unicode is standard
Under Windows CE, function parameters are defined as Unicode (two bytes) in the Win32 API. This also
applies to standard text characters. The well-known ANSI string functions are (usually) not added directly;
wide char alternatives are used instead.
Examples: CHAR WCHAR strcpy wcscpy
A compiler-dependent alternative is to use functions with the prefix _t. Example: _tcscpy, TCHAR
(depending on the platform, this is replaced with ANSI or Unicode).
A range of conversion 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 string.
WideCharToMultiByte() Converts wide character string into multibyte string.
MultiByteToWideChar() Converts multibyte string into wide character string.
Table 4 – Unicode conversion
Note
In theory, the emulator is a useful tool to develop and test a program. However in
practice, this is only partly the case as the emulator does not store the hardware
and peripherals of the target devices. One example here includes the integrated
scanner on mobile devices.
ACD recommends explicitly programming the target devices (ARMV4I) and
testing the software by remote debugging on a developer device.
•It takes only marginally longer to load a program to a device over WLAN, LAN
or USB as it does to load it onto the emulator.
•Any compiling work is usually avoided.
•The device hardware is also included in the program test.
•The finished program has been tested more effectively.

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 18 / 65
3.4.3 Defining the Windows 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 runtime, suitable Windows API functions are available such as
GetVersionEx().

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 19 / 65
4 C# programming with Visual Studio
Mobile applications for second edition Windows CE devices can be programmed with Visual Studio 2008.
- Visual Studio 2008 Compact Framework 3.5 (recommended)
Compact Framework 2.0 (not recommended)
The application is transferred and executed (remote debugging) automatically by the Windows Mobile
Device Centre / ActiveSync (see Chapter 2).
4.1 Installation
It is 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/details.aspx?FamilyID=E497988A-
C93A-404C-B161-3A0B323DCE24
Compact Framework 2.0:
http://www.microsoft.com/downloads/de-de/details.aspx?FamilyID=aea55f2f-
07b5-4a8c-8a44-b4e1b196d5c0
4.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:
Click Smart Device project type and template, Smart Device Project:

WinCEGeräteSE_Handbuch_Programmierung_v3.00_EN 20 / 65
Once you have selected the project template, select the project type and the target framework (Compact
Framework 3.5 / 2.0).
Then click OK to generate the project.
4.3 Deployment
In the project settings (right-click Project
Properties), go to Devices to configure the deployment settings.
Output file folder
Define here the directory on the device where the application should be automatically copied to by Visual
Studio after compilation.
Deploy the latest version of the .NET Compact Framework
Deactivate this option as the second edition ACD devices are configured by default with a relevant version of
.NET Compact Framework 3.5.
If you enable this option, the .NET Compact Framework (3.5 or 2.0) you selected 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 have to use .NET Compact Framework 2.0, you must ensure that the correct CAB file is installed
afterwards on all devices.
4.4 Generating codes and debugging
A Windows Mobile Device Centre / ActiveSync connection is required between the developer PC and device
for the remote debugging of a program (see Chapter 2).
In the menu, select Build
Build Solution (Ctrl + Shift + B) to compile and create the application. If the
program is compiled and linked without any errors, it can then be transferred to the device with Build
Deploy Solution.
Select the Debug
Start Debugging (F5) menu to check the application, transfer it to the device and then
execute it. Similar to desktop PC applications, these applications also provide debugging tools (breakpoints,
variables view, etc.).
This manual suits for next models
2
Table of contents
Other ACD GRUPPE Touch Terminal manuals