Current Cover (3068 bytes)
Current Cover

Navigation Bar (3057 bytes)
Homepage (723 bytes)

The Bull Pen Graphic (834 bytes)
Message Board

Pen Computing Designs (10kb)

Reach the right audience. Advertise right here. (Click to learn more)
Pen Computing Magazine Masthead (5407 bytes)

WinPen 2.0

A Promising Secret

From Pen Computing #7 December 1995

Information on the Pen API in Windows 95 is not easy to come by. Even the 1350-page Windows 95 Resource Kit mentions the word pen just twice and contains no information at all about the pen services, not even the ink services built into standard Windows 95. Or look at any of the dozens of Windows 95 books out there, and you won't even find the word "pen" mentioned at all.

The only information comes from-surprise-Microsoft. The 540 page Programmer's Guide to Pen Services for Microsoft Windows 95 describes every aspect of the pen subsystem, and even the Programmer's Guide to Microsoft Windows 95 contains a 30-page chapter on how to use and display pen data (both published by Microsoft Press (1-800-MSPRESS)).

Considering this rich set of documentation, it would be interesting to know specifics about the development of version 2.0 of the Pen API and the reasoning that led to its partial removal from standard Windows 95 at the eleventh hour. What did its designers have in mind when they created a pen environment that appears far richer and better integrated than the old Windows for Pen Computing, only to keep it a secret? Pen Computing Magazine contacted each of the three WinPen 2.0 program managers at Microsoft with a request for information. None replied.

As is, Windows 95 comes with a subset of the Pen API for displaying pen data so that a pen-based application can collect and store pen data, and later display and manipulate it on any PC running Windows 95 even if that PC does not have pen hardware. Microsoft suggests that this functionality can be used to display signatures for letters or faxes, verifying signatures collected on pen machines, animating ink for presentations or games, storing ink, and displaying maps, graphics, and notes that were created on a pen system. Windows 95 therefore has guaranteed access to at least the display portion of the Pen API; if there is pen hardware, the application can also accept pen input. The full pen services, however, are only available from pen equipment OEMs.

The architecture of version 2.0 of the Pen API is similar to version 1.0, also known as Windows for Pen Computing. The heart of the pen services for Windows 95 consists of two libraries, the PKPD.DLL Ink Manager Library and the PENWIN.DLL Pen Windows Library. PKPD.DLL, a 48KB application in the WINDOWS\SYSTEM directory, provides ink management so that an application can display and manipulate existing ink data with any installation of Windows 95 through a total of 41 Pen API functions. PENWIN.DLL provides additional pen services to collect. modify, and recognize ink data. As stated above, PENWIN.DLL is only available from pen hardware OEMs. Standard Windows 95 also does not include the pen installable driver PENC.DRV, which interacts with the virtual pen driver VPENDC.VXD, and the Microsoft Handwriting Recognizer, GRECO.DLL.

Microsoft says it decided to use 16-bit functions for the pen API because it is designed for small handheld computers with limited memory and power. A so called thunk layer converts 32-bit functions to 16-bit. For applications created in a full 32-bit environments, PENWIN32.DLL and PKPD32.DLL offer the same pen support as their 16-bit equivalents without requiring the intermediate thunk conversion. There are some outdated functions carried over from version 1.0 for backward compatibility. Those are not supported by the 32-bit DLLs and will not be supported at all in future versions.

All Pen Windows settings are concentrated in the SYSTEM.INI file. If you are lucky enough to have the pen extensions, a setup information file called PENWIN.INF contains the script to install Pen Services as an optional system component (the entries are: [boot],
drivers=pen penwindows, PenWinErrors=1; [drivers], pen=penc.drv, penwindows=penwin.dll).

Overall, version 2.0 of the Pen API provides more services and more ways to create innovative pen application than Windows for Pen Computing. Microsoft also changed its programming philosophy, especially in the area of recognition where the Pen API now allows greater freedom and responsibility for the handling and interpretation of pen input. It's still no PenPoint, but it certainly offers programmers a wealth of new tools to create elegant, powerful, and entirely pen-centric applications.

It is now up to pen hardware manufacturers to make pen libraries available for their products. But since few current pen computers have the power to run Windows 95, it is likely that WinPen 2.0 will start to shine only on the next generation of pen computers.

- Conrad Blickenstorfer


[Homepage]
[Features] [Showcase] [Developer] [Members] [Subscribe] [Resources] [Contacts] [Guidelines]

All contents ©1995-1998 Pen Computing Magazine, Inc. All rights reserved.
Unauthorized reproduction in any form is strictly prohibited.
Contact the Pen Computing Publishing Office for reprint information
.