Microsoft KB Archive/119459

-

The information in this article applies to:


 * Microsoft Visual C++, 32-bit Editions, version 1.0

-

SUMMARY
Visual C++ comes with a Help file titled "Moving to Visual C++," which includes a section on building device drivers using Visual C++. The information in this section is correct; however, it is not complete. There is another issue that needs to be addressed if you are using the initial release of the Win32 DDK: the checksum.

MORE INFORMATION
The following information is taken from the Help file "Moving to Visual C++":

Q. How do I build device drivers with Visual C++?

A. Although Visual C++ does not supply all of the libraries, headers, and tools needed to create device drivers for Windows NT, you can still use many Visual C++ components.


 * 1) Update the command-line tools included with the DDK with the versions provided with Visual C++.

NOTE: Not all of the tools provided in the DDK (such as MASM) are supplied with Visual C++, so be careful when deleting files.
 * 1) Make appropriate changes to the source files and makefile.

See:

- How do I migrate my Win32 SDK source files to Visual C++?

- How do I use my Win32 SDK makefiles with Visual C++?
 * 1) Use the BUILD or NMAKE utility to build the device driver.

You will also need to take the checksum into account. The ability to produce a checksum was added to the SDK tools just before their release times. The Visual C++ linker was changed to support checksums as well, but not by default; this is because checksum support is not always necessary and checksum support increases the time it takes to perform a link.

To set the checksum in the header file of the executable file, use "link /release" or "editbin /release". The documentation for editbin (EDITBIN.WRI), includes the following description of "/release":

This option sets the checksum in the header of an executable file.

The operating system requires the checksum for certain files such as device drivers. It is recommended that you set the checksum for release versions of your programs to ensure compatibility with future operating systems. This option is included in the MAKEFILE.DEF file included with later releases of the Win32 DDK in MSDN Level 2.

Additional query words: kbinf 1.00

Keywords         : TlsMisc Version          : 1.00 Platform         : NT WINDOWS Issue type       : Last Reviewed: August 5, 1999