Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 26 of 40

700 Series Color Mobile Computer User's Manual: Section 7 - Programming, pages 210 to 219

Pages 210 to 219 of 346, from 700 Series Color Mobile Computer User's Manual

The original document is the PDF (2.9 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Intermec Model 720, Intermec Model 740, Intermec Model 741, Intermec Model 751, Intermec Model 760, Intermec Model 710, Intermec Model 730 and Intermec Model 761

Page 210

Section 7

Programming "

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

The following programming information pertains to the 700 Series Color Mobile Computer: " " " " " "

Creating CAB Files FTP Server (page 7-12) Full Screen (page 7-19) Kernel I/O control functions (page 7-20) Reboot Functions (page 7-35) Remapping the Keypad (page 7-36)

Creating CAB Files The Windows CE operating system uses a .CAB file to install an application on a Windows CE-based device. A .CAB file is composed of multiple files that are compressed into one file. Compressing multiple files into one file provides the following benefits: All application files are present. " A partial installation is prevented. " The application can be installed from several sources, such as a desktop computer or a Web site. Use the CAB Wizard application (CABWIZ.EXE) to generate a .CAB file for your application. "

Creating Device-Specific CAB Files Do the following to create a device-specific .CAB file for an application, in the order provided: 1. Create an .INF file with Windows CE-specific modifications (page 7-2). 2. Optional Create a SETUP.DLL file to provide custom control of the installation process (page 7-10). 3. Use the CAB Wizard to create the .CAB file, using the .INF file, the optional SETUP.DLL file, and the device-specific application files as parameters (page 7-11).

700 Series Color Mobile Computer User’s Manual

7-1

Page 211

Programming

SECTION 1

Creating an .INF File

An .INF file specifies information about an application for the CAB Wizard. Below are the sections of an .INF file: [Version]

This specifies the creator of the file, version, and other relevant information. Required? Yes Signature: “signature_name” Must be “$Windows NT$” as Windows CE is not available on Windows 95. Provider: “INF_creator” The company name of the application, such as “Microsoft.” CESignature: EXAMPLE:

“$Windows CE$”

[Version] Signature = “$Windows NT$” Provider = “Microsoft” CESignature = “$Windows CE$” [CEStrings]

This specifies string substitutions for the application name and the default installation directory. Required? Yes AppName: app_name Name of the application. Other instances of %AppName% in the .INF file will be replaced with this string value, such as RP32. InstallDir: default_install_dir Default installation directory on the device. Other instances of %InstallDir% in the .INF file will be replaced with this string value. Example: \storage_card\%AppName%

EXAMPLE:

[CEStrings] AppName=“Game Pack” InstallDir=%CE1%\%AppName% [Strings]

This section is optional and defines one or more string keys. A string key represents a string of printable characters. Required? No string_key: value String consisting of letters, digits, or other printable characters. Enclose value in double quotation marks ““”” if the corresponding string key is used in an item that requires double quotation marks. No string_keys is okay.

EXAMPLE:

7-2

[Strings] reg_path = Software\Microsoft\My Test App

700 Series Color Mobile Computer User’s Manual

Page 212

Programming

SECTION 7

[CEDevice]

Describes the platform for the targeted application. All keys in this section are optional. If a key is nonexistent or has no data, Windows CE does not perform any checking with the exception being UnsupportedPlatforms. If the UnsupportedPlatforms key exists but no data, the previous value is not overridden. Required? Yes ProcessorType : processor_type The value that is returned by SYSTEMINFO.dwProcessorType. For example, the value for the SH3 CPU is 10003 and the MIPS CPU is 4000. UnsupportedPlatforms: platform_family_name This lists known unsupported platform family names. If the name specified in the [CEDevice.xxx] section is different from that in the [CEDevice] section, both platform_family_name values are unsupported for the microprocessor specified by xxx. That is, the list of unsupported platform family names is appended to the previous list of unsupported names. Application Manager will not display the application for an unsupported platform. Also, a user will be warned during the setup process if the .CAB file is copied to an unsupported device. EXAMPLE:

[CEDevice] UnsupportedPlatforms = pltfrm1 ; pltfrm1 is unsupported [CEDevice.SH3] UnsupportedPlatforms = ; pltfrm1 is still unsupported

VersionMin: minor_version Numeric value returned by OSVERSIONINFO.dwVersionMinor. The .CAB file is valid for the currently connected device if the version of this device is greater than or equal to VersionMin. For Windows CE Japanese language devices, set this to 2.01 VersionMax: major_version Numeric value returned by OSVERSIONINFO.dwVersionMajor. The .CAB file is valid for the currently connected device if the version of this device is less than or equal to VersionMax. For Windows CE Japanese language devices, set this to 2.01 " NOTE:

Supported Windows CE operating system versions include 1.0, 1.01, 2.0, 2.01, and 2.10. When using these numbers, be sure to include all significant digits.

BuildMin: build_number Numeric value returned by OSVERSIONINFO.dwBuildNumber. The .CAB file is valid for the currently connected device if the version of this device is greater than or equal to BuildMin. BuildMax: build_number Numeric value returned by OSVERSIONINFO.dwBuildNumber. The .CAB file is valid for the currently connected device if the version of this device is less than or equal to BuildMax.

700 Series Color Mobile Computer User’s Manual

7-3

Page 213

Programming

SECTION 7

EXAMPLE:

The following code example shows three [CEDevice] sections: one that gives basic information for any CPU and two that are specific to the SH3 and the MIPS microprocessors. [CEDevice] ; A “template” for all platforms UnsupportedPlatforms = pltfrm1 ; Does not support pltfrm1 ; The following specifies version 1.0 devices only. VersionMin = 1.0 VersionMax = 1.0 [CEDevice.SH3] ; Inherits all [CEDevice] settings ; This will create a .CAB file specific to SH3 devices. ProcessorType = 10003 ; SH3 .cab file is valid for SH3 microprocessors. UnsupportedPlatforms = ; pltfrm1 is still unsupported ; The following overrides the version settings so that no version checking is performed. VersionMin = VersionMax = [CEDevice.MIPS] ; Inherits all [CEDevice] settings ; This will create a .CAB file specific to “MIPS” devices. ProcessorType = 4000 ; MIPS .CAB file is valid for MIPS microprocessor. UnsupportedPlatforms =pltfrm2 ; pltfrm1, pltfrm2 unsupported for MIPs .CAB file.

" NOTE:

To create the two CPU-specific .CAB files for the SETUP.INF file in the previous example, run the CAB Wizard with the “/cpu sh3 mips” parameter. [DefaultInstall]

This describes the default installation of your application. Note that under this section, you will list items expanded upon later in this description. Required? Yes Copyfiles: copyfile_list_section Maps to files defined later in the .INF file, such as Files.App, Files.Font, and Files.Bitmaps. AddReg: add_registry_section Example: RegSettings.All CEShortcuts: shortcut_list_section String that identifies one more section that defines shortcuts to a file, as defined in the [CEShortcuts] section. CESetupDLL: setup_DLL Optimal string that specifies a SETUP.DLL file. It is written by the Independent Software Vendor (ISV) and contains customized functions for operations during installation and removal of the application. The file must be specified in the [SourceDisksFiles] section. CESelfRegister: self_reg_DLL_filename String that identifies files that self-register by exporting the DllRegisterServer and DllUnregisterServer Component Object Model (COM) functions. Specify these files in the [SourceDiskFiles] section. During installation, if installation on the device fails to call the file’s exported DllRegisterServer function, the file’s exported DllUnregisterServer function will not be called during removal.

EXAMPLE:

7-4

[DefaultInstall] AddReg = RegSettings.All CEShortcuts = Shortcuts.All

700 Series Color Mobile Computer User’s Manual

Page 214

Programming

SECTION 7

[SourceDiskNames]

This section describes the name and path of the disk on which your application resides. Required? Yes disk_ordinal: disk_label,,path 1=,“App files” , C:\Appsoft\RP32\... 2=,“Font files”,,C:\RpTools\... 3=,“CE Tools” ,,C:\windows ce tools... CESignature: EXAMPLE:

“$Windows CE$”

[SourceDisksNames] ; Required section 1 = ,“Common files”,,C:\app\common ; Using an absolute path [SourceDisksNames.SH3] 2 = ,“SH3 files”,,sh3

; Using a relative path

[SourceDisksNames.MIPS] 2 = ,“MIPS files”,,mips

; Using a relative path

[SourceDiskFiles]

This describes the name and path of the files in which your application resides. Required? Yes filename: disk_number[,subdir] RPM.EXE = 1,c:\appsoft\... WCESTART.INI = 1 RPMCE212.INI = 1 TAHOMA.TTF = 2

" NOTE:

[,subdir] is relative to the location of the INF file.

EXAMPLE:

[SourceDisksFiles] ; Required section begin.wav = 1 end.wav = 1 sample.hlp = 1 [SourceDisksFiles.SH3] sample.exe = 2 ; Uses the SourceDisksNames.SH3 identification of 2. [SourceDisksFiles.MIPS] sample.exe = 2 ; Uses the SourceDisksNames.MIPS identification of 2.

700 Series Color Mobile Computer User’s Manual

7-5

Page 215

Programming

SECTION 7

[DestinationDirs]

This describes the names and paths of the destination directories for the application on the target device. Note Windows CE does not support directory identifiers. Required? Yes file_list_section: 0,subdir String that identifies the destination directory. The following list shows the string substitutions supported by Windows CE. These can be used only for the beginning of the path. \ %CE1% \Program Files %CE2% \Windows %CE3% \My Documents %CE4% \Windows\Startup %CE5% \My Documents %CE6% \Program Files\Accessories %CE7% \Program Files\Communication %CE8% \Program Files\Games %CE9% \Program Files\Pocket Outlook %CE10% \Program Files\Office %CE11% \Windows\Start Menu\Programs %CE12% \Windows\Start Menu\Programs\Accessories %CE13% \Windows\Start Menu\Programs\Communications %CE14% \Windows\Start Menu\Programs\Games %CE15% \Windows\Fonts %CE16% \Windows\Recent %CE17% \Windows\Start Menu %InstallDir% Contains the path to the target directory selected during installation. It is declared in the [CEStrings] section %AppName% Contains the application name defined in the [CEStrings] section. EXAMPLE:

[DestinationDirs] Files.Common = 0,%CE1%\My Subdir Files.Shared = 0,%CE2%

; \Program Files\My Subdir ; \Windows

[CopyFiles]

This section, under the [DefaultInstall] section, describes the default files to copy to the target device. Within the [DefaultInstall] section, files were listed that must be defined elsewhere in the INF file. This section identifies that mapping and may contain flags. Required? Yes copyfile_list_section: destination_filename,[source_filename] The source_filename parameter is optional if it is the same as destination_filename. copyfile_list_section: flags The numeric value that specifies an action to be done while copying files. The table on the next page shows values supported by Windows CE.

7-6

700 Series Color Mobile Computer User’s Manual

Page 216

Programming

SECTION 7

Flag

Value

Description

COPYFLG_WARN_IF_SKIP

0x00000001 Warn user if skipping a file is attempted after error.

COPYFLG_NOSKIP

0x00000002 Do not allow a user to skip copying a file.

COPYFLG_NO_OVERWRITE

0x00000010 Do not overwrite files in destination directory.

COPYFLG_REPLACEONLY

0x00000400 Copy the source file to the destination directory only if the file is already in the destination directory.

CE_COPYFLG_NO_DATE_DIALOG 0x20000000 Do not copy files if the target file is newer. CE_COPYFLG_NODATECHECK

0x40000000 Ignore date while overwriting the target file.

CE_COPYFLG_SHARED

0x80000000 Create a reference when a shared DLL is counted.

EXAMPLE:

[DefaultInstall.SH3] CopyFiles = Files.Common, Files.SH3 [DefaultInstall.MIPS] CopyFiles = Files.Common, Files.MIPS [AddReg]

This section, under the [DefaultInstall] section, is optional and describes the keys and values that the .CAB file adds to the device registry. Within the [DefaultInstall] section, a reference may have been made to this section, such as “AddReg=RegSettings.All”. This section defines the options for that setting. Required? No add_registry_section: registry_root_string String that specifies the registry root location. The following list shows the values supported by Windows CE. HKCR Same as HKEY_CLASSES_ROOT HKCU Same as HKEY_CURRENT_USER HKLM Same as HKEY_LOCAL_MACHINE add_registry_section: value_name Registry value name. If empty, the “default” registry value name is used. add_registry_section: flags Numeric value that specifies information about the registry key. The following table shows the values that are supported by Window CE. Flag

Value

Description

FLG_ADDREG_NOCLOBBER

0x00000002 If the registry key exists, do not overwrite it. Can be used with any of the other flags in this table.

FLG_ADDREG_TYPE_SZ

0x00000000 REG_SZ registry data type.

FLG_ADDREG_TYPE_MULTI_SZ

0x00010000 REG_MULTI_SZ registry data type. Value field that follows can be a list of strings separated by commas.

FLG_ADDREG_TYPE_BINARY

0x00000001 REG_BINARY registry data type. Value field that follows must be a list of numeric values separated by commas, one byte per field, and must not use the 0x hexadecimal prefix.

FLG_ADDREG_TYPE_DWORD

0x00010001 REG_DWORD data type. The noncompatible format in the Win32 Setup .INF documentation is supported. 700 Series Color Mobile Computer User’s Manual

7-7

Page 217

Programming

EXAMPLE:

SECTION 7

AddReg = RegSettings.All [RegSettings.All] HKLM,%reg_path%,,0x00000000,alpha ; <default> = “alpha” HKLM,%reg_path%,test,0x00010001,3 ; Test = 3 HKLM,%reg_path%\new,another,0x00010001,6 ; New\another = 6 [CEShortCuts]

This section, a Windows CE-specific section under the [DefaultInstall] section, is optional and describes the shortcuts that the installation application creates on the device. Within the [DefaultInstall] section, a reference may have been made to this section, such as “ShortCuts.All”. This section defines the options for that setting. Required? No shortcut_list_section: shortcut_filename String that identifies the shortcut name. It does not require the .LNK extension. shortcut_list_section: shortcut_type_flag Numeric value. Zero or empty represents a shortcut to a file; any nonzero numeric value represents a shortcut to a folder. shortcut_list_section: target_file_path String value that specifies the destination location. Use the target file name for a file, such as MyApp.exe, that must be defined in a file copy list. For a path, use a file_list_section name defined in the [DestinationDirs] section, such as DefaultDestDir, or the %InstallDir% string.

shortcut_list_section: standard_destination_path Optional string value. A standard %CEx% path or %InstallDir%. If no value is specified, the shortcut_list_section name of the current section or the DefaultDestDir value from the [DestinationDirs] section is used. EXAMPLE:

CEShortcuts = Shortcuts.All [Shortcuts.All] Sample App,0,sample.exe App,0,sample.exe,%InstallDir%

; Uses the path in DestinationDirs. Sample ; The path is explicitly specified.

Sample .INF File [Version] ; Required section Signature = “$Windows NT$” Provider = “Intermec Technologies Corporation” CESignature = “$Windows CE$” ;[CEDevice] ;ProcessorType = [DefaultInstall] ; Required section CopyFiles = Files.App, Files.Fonts, Files.BitMaps, Files.Intl, Files.TelecomNcsCE, Files.Windows, Files.Import, Files.Export, Files.Work, Files.Database, Files.WinCE AddReg = RegSettings.All ;CEShortcuts = Shortcuts.All [SourceDisksNames] ; Required section 1 = ,“App files” ,,c:\appsoft\... 2 = ,”Font files” ,,c:\WinNT\Fonts 3 = ,”CE Tools” ,,c:\windows ce tools\wce212\6110ie\mfc\lib\x86 [SourceDisksFiles] ; Required section rpm.exe = 1,C:\Appsoft\program\wce212\WCEX86Rel6110 wcestart.ini = 1 rpmce212.ini = 1

7-8

700 Series Color Mobile Computer User’s Manual

Page 218

Programming

SECTION 7 intermec.bmp = 1 rpmlogo.bmp = 1 rpmname.bmp = 1 import.bmp = 1 export.bmp = 1 clock.bmp = 1 printer.bmp = 1 filecopy.bmp = 1 readme.txt = 1 lang_eng.bin = 1 rpmdata.dbd = 1,database\wce1 tahoma.ttf = 2 mfcce212.dll = 3 olece212.dll = 3 olece211.dll = 1,c:\windows ce tools\wce211\NMSD61102.11\mfc\lib\x86 rdm45wce.dll = 1,c:\rptools\rdm45wce\4_50\lib\wce212\wcex86rel picfmt.dll = 1,c:\rptools\picfmt\1_00\wce212\wcex86rel6110 fmtctrl.dll = 1,c:\rptools\fmtctrl\1_00\wce212\wcex86rel6110 ugrid.dll = 1,c:\rptools\ugrid\1_00\wce212\wcex86rel6110 simple.dll = 1,c:\rptools\pspbm0c\1_00\wce211\wcex86rel psink.dll = 1,c:\rptools\psink\1_00\wce211\WCEX86RelMinDependency pslpwce.dll =1,c:\rptools\pslpm0c\1_00\wce211\WCEX86RelMinDependency npcpport.dll = 1,c:\rptools\cedk\212_03\installable drivers\printer\npcp ;dexcom.dll = 1,c:\rptools\psdxm0c\1_00\x86 ncsce.exe = 1,c:\rptools\ncsce\1_04 nrinet.dll = 1,c:\rptools\ncsce\1_04 [DestinationDirs] ; Required section ;Shortcuts.All = 0,%CE3% ; \Windows\Desktop Files.App = 0,%InstallDir% Files.DataBase = 0,%InstallDir%\DataBase Files.BitMaps = 0,%InstallDir%\Bitmaps Files.Fonts = 0,%InstallDir%\Fonts Files.Intl = 0,%InstallDir%\Intl Files.TelecomNcsCE = 0,%InstallDir%\Telecom\NcsCE Files.Windows = 0,%InstallDir%\Windows Files.Import = 0,%InstallDir%\Import Files.Export = 0,%InstallDir%\Export Files.Work = 0,%InstallDir%\Work Files.WinCE = 0,\storage_card\wince [CEStrings] ; Required section AppName = Rp32 InstallDir = \storage_card\%AppName% [Strings] ; Optional section ;[Shortcuts.All] ;Sample App,0,sample.exe ;Sample App,0,sample.exe,%InstallDir%

; Uses the path in DestinationDirs. ; The path is explicitly specified.

[Files.App] rpm.exe,,,0 rpm.ini,rpmce212.ini,,0 mfcce212.dll,,,0 olece212.dll,,,0 olece211.dll,,,0 rdm45wce.dll,,,0 picfmt.dll,,,0 fmtctrl.dll,,,0 ugrid.dll,,,0 simple.dll,,,0 psink.dll,,,0 pslpwce.dll,,,0 npcpport.dll,,,0 ;dexcom.dll,,,0 [Files.DataBase] rpmdata.dbd,,,0 [Files.Fonts] tahoma.ttf,,,0 [Files.BitMaps]

700 Series Color Mobile Computer User’s Manual

7-9

Page 219

Programming

SECTION 7 intermec.bmp,,,0 rpmlogo.bmp,,,0 rpmname.bmp,,,0 import.bmp,,,0 export.bmp,,,0 clock.bmp,,,0 printer.bmp,,,0 filecopy.bmp,,,0 [Files.Intl] lang_eng.bin,,,0 [Files.TelecomNcsCE] ncsce.exe,,,0 nrinet.dll,,,0 [Files.Windows] readme.txt,,,0 [Files.Import] readme.txt,,,0 [Files.Export] readme.txt,,,0 [Files.Work] readme.txt,,,0 [Files.WinCE] wcestart.ini,,,0 [RegSettings.All] HKLM,”SOFTWARE\Microsoft\Shell\AutoHide”,,0x00010001,1 HKLM,”SOFTWARE\Microsoft\Shell\OnTop”,,0x00010001,0 HKLM,”SOFTWARE\Microsoft\Clock”,SHOW_CLOCK,0x00010001,0

; Autohide the taskbar ; Shell is not on top ; Clock is not on taskbar

Using Installation Functions in SETUP.DLL SETUP.DLL is an optional file that enables you to perform custom operations during installation and removal of your application. The following list shows the functions that are exported by SETUP.DLL. Install_Init Called before installation begins. Use this function to check the application version when reinstalling an application and to determine if a dependent application is present. Install_Exit Called after installation is complete. Use this function to handle errors that occur during application installation. Uninstall_Init Called before the removal process begins. Use this function to close the application, if the application is running. Uninstall_Exit Called after the removal process is complete. Use this function to save database information to a file and delete the database and to tell the user where the user data files are stored and how to reinstall the application. " NOTE:

7-10

Use [DefaultInstall] → CESelfRegister (page 7-4) in the .INF file to point to SETUP.DLL.

700 Series Color Mobile Computer User’s Manual