A file that demonstrates how to write a Unidrv-based bitmap driver is available for Windows XP DDK and for Windows Server 2003 (893388)



The information in this article applies to:

  • Microsoft Windows XP Driver Development Kit (DDK)

INTRODUCTION

This article contains information about how to use the BitMapSample.exe file to write a Unidrv-based bitmap driver for the Microsoft Windows XP Driver Development Kit (DDK). The BitMapSample.exe file is based on a redesigned version of the Oemuni sample, which is included with the Windows XP DDK

Note You can also use the BitMapSample.exe file to write a Unidrv-based bitmap driver for Microsoft Windows Server 2003.

MORE INFORMATION

Features of the BitMapSample.exe file

  • The following supported ColorMode options are included in the generic printer description (GPD) of the bitmap driver:
    • Monochrome
    • 4 bits per pixel (bpp)
    • 8bpp
    • 24bpp
  • The bitmap driver implements the ImageProcessing callback function in order to obtain access to bitmap data one band at a time. The implementation of the ImageProcessing callback function by the bitmap driver buffers the bitmap data every time that the bitmap data is called.

    Note The ImageProcessing callback function is also responsible for filling in the BITMAPINFOHEADER structure and the COLORTABLE structure. Both of these structures are required for exporting the bitmap data to a bitmap file.
  • When you print a document, the bitmap driver implements the OEMEndDoc Device Driver Interface (DDI) hook in order to send the bitmap data to the spooler at the end of the print job. After the bitmap driver implements the OEMEndDoc DDI hook, the bitmap driver sends the document headers, and then the bitmap data, to the spooler.
  • The GrowBuffer helper function is called every time that the buffer must be enlarged to hold the bitmap data.
  • The bitmap driver renders multi-page documents into one large output bitmap file.

Known issues in the BitMapSample.exe file

  • The plug-in for the bitmap driver does not support landscape orientation even though the landscape orientation option is present in the generic printer description (GPD) file.
  • In 24bpp mode, documents that are larger than three pages produce a very large bitmap (.bmp) file. Although the output is correct, you may not be able to view the output because of memory limitations in the bitmap viewer.
The following file is available for download from the Microsoft Download Center:
DownloadDownload the BitmapSample.exe package now. For more information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to obtain Microsoft support files from online services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

Modification Type:MajorLast Reviewed:7/29/2005
Keywords:kbhowto kbinfo KB893388 kbAudDeveloper