The text of a manual · part 9 of 38
PEN*KEY 6100 Computer Programmer's Reference Guide: Section 3: Supporting Windows Applications, pages 69 to 77
Pages 69 to 77 of 328, from PEN*KEY 6100 Computer Programmer's Reference Guide
The original document is the PDF (1.2 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.
For the Norand 6100
Page 69
Section 3
Supporting Windows Applications "
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
Introduction This section contains information about Windows Applications for the PEN*KEYR 6100 Computer. Included is a description of the minimal installaĆ tion required for a Windows configuration, components required for this Windows installation, and a discussion of the NORANDR Shell for Windows, and some Windows applications that are designed for the 6100 Computer. Topic Summary Page
NORAND Minimal Windows Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Normal Startup (Standard Mode) DOSX.EXE Startup Windows Components
3-2
NORAND Shell for Windows: NORSHELL.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-5
Windows Power Management Driver: NORWINPM.DRV, VPOWERD.386 . . . Standard APM Event Codes
3-6
Windows Pen Driver: UCLKPEN.DRV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hardware Interface Digitizer Calibration Display Orientation SYSTEM.INI Configuration Example Windows Pen Calibration: PENALIGN.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-15
3-19
Pen for Windows: PENWIN.DLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-19
Integrated Scanner: 61SCAN.DRV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-21
NPCP Printing for Windows: NOR4800.DRV, UNIDRV.DLL . . . . . . . . . . . . . . . .
3-23
IrDA Printing for Windows: NOR6805.DRV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-30
PEN*KEY R 6100 Computer Programmer’s Reference Guide
3-1
3. Windows Applications
Topic
Page 70
Supporting Windows Applications
SECTION 3
NORAND Minimal Windows Installation The following paragraphs describe the Windows 3.1 configuration on the 6100 Computer. NorandĆspecific issues are emphasized. General information on installing and configuring Windows 3.1 itself is available from Microsoft CorporaĆ tion and other organizations. " NOTE:
Before loading Windows, be sure to unload VROTATE.EXE, if previously loaded. Otherwise, the results could be unpredictable. To unload VROTATE, issue the VROTATE –d command.
Installation You can install Windows on a 6100 Computer by copying the Windows diskette to a memory card or by copying the files to the RAM drive. You can then start WinĆ dows by running the WIN.COM program. A table in subparagraph Windows Components, on page 3-3, lists the files provided by Intermec Technologies CorĆ poration, as well as a brief description of each. To illustrate a complete boot sequence from DOS into Windows, the Windows configuration also includes DOS startup files such as COMMAND.COM, AUTOEXEC.BAT, and CONFIG.SYS.
Windows Operating Modes The Windows 3.1 minimal configuration is shipped with all the files necessary for operating Windows in both Standard and Enhanced modes. Where possible, you should run Windows in Standard mode. Standard mode can be configured into a much smaller footprint and can provide better performance. You can start StanĆ dard mode by using the option when running WIN.COM. For more informaĆ tion on files that can be removed from the configuration, if Enhanced mode is not required (refer to Windows Components, on page 3-3). 3. Windows Applications
Configuration The Windows 3.1 package, supplied by Intermec Technologies Corporation, is shipped with a default configuration appropriate for the 6100 Computer. It should require no further configuration to run.
Normal Startup (Standard Mode) The Windows startup sequence is as follows: 1. MS-DOS boots and processes CONFIG.SYS and AUTOEXEC.BAT. 2. AUTOEXEC.BAT runs WIN.COM. 3. WIN.COM displays the Windows 3.1 logo and launches DOSX.EXE, the standardĆmode DPMI server. 4. DOSX.EXE loads WSWAP.EXE and launches KRNL386.EXE, the Windows kernel for 32Ćbit processors. 5. KRNL386.EXE initializes GDI.EXE, USER.EXE, the system drivers (mouse, keyboard, etc.), and the installable drivers. During and after this step, the SYSTEM.INI file is referenced to locate drivers and driver configuĆ ration settings. 3-2
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 71
SECTION 3
Supporting Windows Applications
6. KRNL386.EXE now loads the Windows shell program. In this case, NORSHELL.EXE is loaded. 7. After referring to the WIN.INI initialization file, NORSHELL.EXE launches the user application, which, in this case, is the Windows 3.1 File Manager. Windows startup is now complete and the File Manager is open.
DOSX.EXE Startup As mentioned earlier, you can start Windows 3.1 standard mode by running WIN.COM. An alternative method is to run DOSX.EXE directly. If run directly, the WIN.COM and WSWAP.EXE files can be left out of the system to save space. Note that the standard mode configuration does not support execution of DOS programs. For a more detailed discussion of Windows startup, refer to chapter 1 of the book Windows Internals, by Matt Pietrek, published by Addison-Wesley.
Windows Components The following tables list the Windows 3.1 files for 6100 Computer. The table titles indicate the category. Files marked Optional may be deleted from the conĆ figuration if the running applications do not need them. Table 3-1 Windows Startup and Shell Programs Component
Description
WIN.COM WINTITLE.RLE NORSHELL.EXE WINFILE.EXE
DOS program that launches Windows. Default desktop wallpaper. Displays Windows 3.1 logo. Norand shell program. Windows File Manager shell, launched by NORSHELL.EXE.
Optional Optional Optional Optional
Component
Description
SYSTEM.INI
Initialization file for Windows system and drivers. [BOOT.DESCRIPTION] section of this file has version strings for drivers and applications. WIN.INI Initialization file for Windows applications. WINFILE.INI Initialization file for WINFILE.EXE.
Required Required Optional
Table 3-3 Windows System Kernel Component SYSTEM/DOSX.EXE SYSTEM/WSWAP.EXE
Description DPMI server. Swaps out standardĆmode Windows when a DOS application is run. Optional, if no DOS applications are run during a Windows session. SYSTEM/KRNL386.EXE Windows 3.1 kernel for 32Ćbit systems. SYSTEM/GDI.EXE Windows 3.1 Graphical Device Interface code. SYSTEM/USER.EXE Windows 3.1 user interface.
Required Optional Required Required Required
PEN*KEY R 6100 Computer Programmer’s Reference Guide
3-3
3. Windows Applications
Table 3-2 Initialization Files
Page 72
Supporting Windows Applications
SECTION 3
Table 3-4 Windows Enhanced Mode Files Component SYSTEM/WIN386.EXE SYSTEM/VTDAPI.386 SYSTEM/NORVKD.386 SYSTEM/VPOWERD.386
Description (All files in this group are needed only for Enhanced mode.) Virtual machine manager and default virtual device drivers. Required Virtual timer device API. Needed for Enhanced mode multimedia. Required Windows 3.1 system file. Runs Windows in enhanced mode. Required Windows 3.1 Enhanced Mode Power Management support. Required
Table 3-5 Windows System Device Drivers Component SYSTEM/COMM.DRV SYSTEM/KEYBOARD.DRV SYSTEM/SYSTEM.DRV SYSTEM/YESMOUSE.DRV SYSTEM/6100DISP.DRV SYSTEM/SOUND.DRV SYSTEM/UNIDRV.DRV
Description Windows 3.1 serial port driver. Windows 3.1 keyboard driver. Windows 3.1 system driver. Windows 3.1 driver reports a mouse is available. PEN*KEY 6100 portrait video driver. Windows 3.1 sound driver Windows 3.1 universal printer driver. Used by NOR4800.DRV. Required only if NOR4800.DRV for NPCP printing is used.
Required Required Required Required Required Optional Required
Table 3-6 Windows Installable Device Drivers
3. Windows Applications
Component Description SYSTEM/NORWINPM.DRV Windows Advanced Power Management (APM) driver for 6100 Computer. Provides interface to power management and system control hardware. Requires APM BIOS (ELANAPM.EXE). SYSTEM/UCLKPEN.DRV Pen driver for 6100 Computer. Provides pen input for Microsoft Windows for Pen Computing 3.1, mouse input for Windows 3.1. SYSTEM/61SCAN.DRV Scanner driver for 6100 Computer. Provides barĆcode scanning capabilities for Windows. SYSTEM/NORNPCP.DRV Provides NPCP printing support under Windows 3.1. SYSTEM/NORIRDA.DRV Provides IrDA printing capabilities. SYSTEM/NOR4800.DRV Windows 3.1 4800 series printer driver, supports NPCP printing. SYSTEM/NOR6805.DRV Windows 3.1 6800 series printer driver, supports IrDA printing.
Required Required Optional Optional Optional Optional Optional
Table 3-7 EGA Device Fonts Component SYSTEM/EGAFIX.FON SYSTEM/EGAOEM.FON SYSTEM/EGASYS.FON 3-4
Description FixedĆpitch device font. OEM device font. Proportional device font.
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Required Required Required
Page 73
SECTION 3
Supporting Windows Applications
Table 3-8 Popular System DLLs Component SYSTEM/COMMDLG.DLL SYSTEM/LZEXPAND.DLL SYSTEM/SHELL.DLL
Description Provides common dialogs like file open, file save, and printing. Functions for file expansion and copying. Basic services common to Windows 3.1 shell programs, such as File Manager. SYSTEM/VER.DLL Windows versioning API. SYSTEM/WIN87EM.DLL FloatingĆpoint emulator. SYSTEM/OLECLI.DLL Object Linking and Embedding client. SYSTEM/OLESVR.DLL Object Linking and Embedding server. SYSTEM/DDEML.DLL Dynamic Data Exchange. SYSTEM/TOOLHELP.DLL Debugging services.
Optional Optional Optional Optional Optional Optional Optional Optional Optional
Table 3-9 Utilities Component Description PENALIGN.EXE PEN*KEY 6000 Series pen calibration application.
Optional
NORAND Shell for Windows: NORSHELL.EXE The Windows shell replacement program, NORSHELL.EXE, provides system management functions that are specific to PEN*KEY 6000 Series Computers. NORSHELL.EXE, which must be loaded in all Windows configurations, provides a method for launching multiple applications when Windows starts; this is funcĆ tionality that is similar to that provided by the standard Windows shells (ProĆ gram Manager and File Manager).
Installation shell=norshell.exe
Configuration: WIN.INI Entries To configure NORSHELL.EXE, make the following entries in the section of the WIN.INI Windows initialization file: " NorShellRun Add the command line>" line to WIN.IĆ NI in order to launch an application. You may also specify any command line switches that required by the application. " NorShellRunDir If you need to specify a startup drive and directory for an application, add the " line to WIN.INI. NORSHELL changes the default drive and directory as needed. " NorShellLaunch Note that NORSHELL does not interpret the and lines in WIN.INI so that conflicts with other Windows shell programs can be avoided. For example, use the Windows File Manager as your application and have it process the WIN.INI and lines. PEN*KEY R 6100 Computer Programmer’s Reference Guide
3-5
3. Windows Applications
To install NORSHELL.EXE as the Windows shell program, edit the line in SYSTEM.INI, as shown in the following example:
Page 74
Supporting Windows Applications
SECTION 3
If you do need to launch several utilities or applications before starting a particular application, add a list>" line to WIN.INI. This line is formatted identically with the line that is used by the standard Windows shell programs. The utilities or application programs are run in the same order as they appear in the WIN.INI file; and are displayed with the SW_SHOWMINIMIZED setting. Refer to the Windows 3.1 documentation for the ShowWindow function.
NORSHELL WIN.INI Examples All of the examples in this paragraph assume the SYSTEM.INI entry docuĆ mented in the preceding paragraphs. The following example WIN.INI file demĆ onstrates running an application, MYAPP.EXE, after changing to drive and directory Before running the application, the Windows clock and calculaĆ tor programs are executed. [WINDOWS] NorShellRun=MYAPP.EXE /a switch /another switch NorShellRunDir=c:\app NorShellLaunch=clock.exe calc.exe
The following example WIN.INI file launches the Windows File Manager shell application, which launches the clock and calculator in turn. [WINDOWS] NorShellRun=WINFILE.EXE run=clock.exe calc.exe
Shutting Down Windows Windows shuts down automatically whenever the shell program exits. However, because NORSHELL does not exit (in that sense), it shuts Windows down whenĆ ever it detects that the application from the NorShellRun line no longer exists. An application may shut down Windows on its own, by calling the Windows 3.1 ExitWindows function. This is the preferred method. 3. Windows Applications
Windows Power Management Driver: NORWINPM.DRV, VPOWERD.386 The NORWINPM.DRV driver provides a Windows interface to the APM BIOS extensions, for both the Standard and Enhanced modes. VPOWERD.386 is also included for the Enhanced mode. The driver's functions include the following: Idling the CPU when Windows has nothing to do. " Warning the user about critical power management events, such as low batteries, unless an application wants to take over that responsibility. " Broadcasting APM event codes to Windows applications and drivers and DOS TSRs. The information in this paragraph corresponds to version 1.05 of NORĆ WINPM.DRV. "
3-6
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 75
SECTION 3
Supporting Windows Applications
Installation NORWINPM.DRV is a Windows 3.1 installable driver. It requires that the APM 1.1 BIOS extensions be installed before Windows is started. The APM BIOS (that NORWINPM needs) may come from the builtĆin system BIOS or from a separate DOS TSR, ELANAPM.EXE, which must be run before starting WinĆ dows. To install NORWINPM.DRV: Place a keyword on the line and add a line to the section of SYSTEM.INI, equating the keyword with the actual path to NORWINPM.DRV. This is the typical approach. The power management entry should come first on the line. The following is an example of a section of the SYSTEM.INI file, showing the use of the SYSTEM.INI commands. [boot] drivers= power pen penwindows scanner npcp irda where: drivers= tells Windows to load the installable drivers. This list of drivers is the standard driver list (in the order that it needs to be). The significant drivers here, are power and pen. These are merely token names for the drivers. The actual driver names are specified in the following [drivers] section of the SYSTEM.INI file: [drivers] power=norwinpm.drv pen=uclkpen.drv [386 enh] device=vpowerd.386 where: power= tells Windows the actual name of the installable Power Management driver named in the [boot] section of the SYSTEM.INI file (listed above).
" NOTE:
Do not load the DOS Power Management driver, NORDOSPM.EXE, if the 6100 Computer is running Windows.
Configuration NORWINPM.DRV supports the SYSTEM.INI entries described below. Place them in the [POWER Driver] section of SYSTEM.INI. Note: case is insignificant.
Fuel Gauge Settings WindowX, WindowY Valid value:
0
It defaults to the lower right corner of screen (last position). These entries set the initial screen position of the fuel gauge. They can be set to offscreen coordinates, as well, so the gauge can be hidden, if desired. These enĆ tries are updated whenever the user moves the fuel gauge. PEN*KEY R 6100 Computer Programmer’s Reference Guide
3-7
3. Windows Applications pen= tells Windows the actual name of the installable Pen driver named in the [boot] section of the SYSTEM.INI file (listed above).
Page 76
Supporting Windows Applications
SECTION 3
OnTop Valid values:
0, 1
Default value:
1
This determines whether the fuel gauge is a window or not. A most" window appears above all other nonĆtopmost windows, typically floating above the active window. Setting this entry to 0 allows other windows to cover the fuel gauge whenever they are selected. TextOptions Valid values:
0x0000 to 0x000F
Default value:
0x0006
This is an Options Bitmap that indicates the items to be displayed in text form beneath the fuel gauge icon. The bits are: " " " "
0x0001: 0x0002: 0x0004: 0x0008:
Show battery life remaining percentage. Show battery status: Show charge status: Show AC status:
Miser Settings Miser Valid values:
0, 1
Default value:
0
3. Windows Applications
This entry enables the Power Miser by setting this entry to 1. The power miser can increase battery life when running an application that does not allow the Windows kernel to idle. It does this by forcing the Windows kernel to idle at apĆ propriate times. If the bar on the fuel gauge icon is always topped out, try enabling this entry. The Miser can be somewhat invasive so the best apĆ proach is to implement a well powerĆmanaged application that allows the system to idle on its own. See the description below, for MiserLimit. MiserLimit Valid values:
0 to 255
Default value:
2
As mentioned above, the Miser mode can be invasive to the system. It might force too many idles to occur. This entry limits the amount of idling that Miser mode forces. Higher values cause fewer idles. If it appears that the Miser is slowing down or interfering with an application, increase this value to lessen the interference (which also lowers power savings.) If the interference cannot be cleared, disable the miser mode.
3-8
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 77
SECTION 3
Supporting Windows Applications
Message Output Settings ApmSuspendDialog Valid values:
0, 1
Default value:
1
When the user presses the on/off button, NORWINPM.DRV polls all of the drivĆ ers and programs in the system with a USERSUSPEND message (see below) to determine if it is OK to suspend. This configuration entry determines whether NORWINPM.DRV displays a dialog notifying the user if an application or driver refuses to suspend. Value 0
1
Description No warnings or debug messages, if the user suspend request fails. It is assumed that the system component that fails the request, either notifies the user on its own, or suspends the system after finishing the critical activity in which it was involved. It is very impolite to ignore the button press and not give the user any feedback. NORWINPM.DRV notifies the user that the suspend request failed by displaying a message (see messages below) in a dialog box. Execution continues after the user presses an OK button.
MsgLevel Valid values:
0, 1, 2, 8, 10, 15 (see table below)
Default value:
1
This configuration entry indicates which APM events cause a dialog to be preĆ sented to the user by NORWINPM.DRV. Note that each dialog level includes all the messages from the levels below it.
1
2
5 8 10
15
Description No Warnings or Debug Messages: appropriate when an application wants to control the timing and presentation of power management event notification. The application would catch the messages broadcast by NORWINPM.DRV and deal with them accordingly. Warnings: only display dialogs for APM warnings, such as battery status. See MsgRepeatMinutes below. This is the driver default. Note that if the user does not clear the dialog by pressing the OK button or by pressing a key, the dialogs continue to stack up. Infrequent Dialog Information: display dialogs for warnings and informational messages, such as suspend/resume, etc. This is a debugĆmode switch. The only messages that it does not show are messages that repeat frequently. In addition, this setting causes the system to beep periodically when system activity is detected such as keystrokes, pen activity, or communications messages. This can determine if suspend or backlight timeĆouts are held off correctly. A debug setting that displays messages that repeat frequently (every 10 seconds or so) but are different each time. Frequent, But Non-Repeating Debug Information: Frequent, Repeating Debug Information: a debug setting that additionally displays messages that repeat frequently and do not vary. This setting usually causes a steady stream of dialogs to appear at short intervals (10 seconds or less). All Messages: PEN*KEY R 6100 Computer Programmer’s Reference Guide
3-9
3. Windows Applications
Value 0