Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesWrite Windows 95 Virtual Device Drivers on Higher Ground


May 1996 / News & Views / Write Windows 95 Virtual Device Drivers on Higher Ground
Rick Grehan

If any branch of Windows programming might rightly be called rocket science, surely virtual-device-driver (VxD) programming is it. Delving into Microsoft's Windows device driver kit (DDK) in any determined fashion should qualify you for a programming Purple Heart. Moreover, building a VxD has required a serious foray into low-level assembly language programming.

Notice I said "required." Thanks to the people at Vireo Software (Acton, MA), you no longer have to write your VxD in assembly language. With VtoolsD, you can use C or C++. Vireo's version of VtoolsD for Windows 3.1 first appeared in July 1994. What's new and importan t, given the key role that VxDs have in extending t he core features of the Windows 95 kernel, is the version of VtoolsD for Windows 95.

VtoolsD for Windows 95 ($495) requires either Windows NT or 95. If you're running NT, you can only edit and compile the VxD--you can't execute or debug it. You'll also need Microsoft Visual C/C++ 2.0 or higher, or Borland C/C++ 4.02 or higher.

The product consists of a suite of tools plus a collection of libraries. VtoolsD includes plenty of source code samples to get you started (and if you're new at VxD programming, you'll need them). It also comes with VxDView, a VxD sniffer that snoops on all the VxDs currently running on your system. (You'd be surprised at how many VxDs are active in a Windows 95 system. I counted 71 in mine.) VxDView is handy for verifying that your VxD has at least properly registered itself with the system. However, the prow of VtoolsD is the QuickVxD utility, a VxD "skeleton builder" that generates either C or C++ code ( see the screen ).

Quick VxD lets you select the control messages to which your VxD will respond. (Windows 95 sends control messages to VxDs on software and hardware events, such as device initialization or application execution.) For the C version, each message you select produces an entry in a switch() statement within a dispatcher function. In the C++ framework, QuickVxD creates methods associated with each event. In either case, you need only pour code into the empty functions (or methods) that QuickVxD constructs in the emitted source file. This source code, plus the libraries you link in, handles all the VxD initialization and VxD-to-application interface nastiness that makes this such a black art. You can concentrate on what your VxD actually does.


Product Information


Vireo Software

Phone:    (508) 264-9200
Fax:      (508) 264-9205
E-Mail:   
vireo@vireo.com

Internet: 
http://world.std.com/vireo/


HotBYTEs
 - information on products covered or advertised in BYTE


VxD's Blast Off

screen_link (31 Kbytes)

A: The tabbed window panes in VtoolsD's QuickVxD utility let you set most of your VxD's parameters in a visual fashio. Once you've set the parameters, QuickVxD produces a source code "skeleton"; you flesh out the functionality.

B: QuickVxD will generate source code for C or C++.

C: Note the button for dynamically loadable (and unloadable) support. QuickVxD lets you write application-specific drivers that release system resources by unloading when not needed. Dynamically loadable VxDs can also take advantage of Windows 95 capabilities, such as Plug and Play.


Up to the News & Views section contentsGo to previous article: Go to next article: WordPerfect Losing Ground to MicrosoftSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network