Driver Functions SetDIBtoDevice and StretchDIB

Last reviewed: February 16, 1995
Article ID: Q75946
The information in this article applies to:
  • Microsoft Windows Device Driver Kit (DDK) for Windows versions 3.0 and 3.1

SUMMARY

The SetDIBtoDevice() and StretchDIB() functions in the PostScript sample driver provided with the Microsoft Windows Device Development Kit (DDK) have ordinal values of 21 and 28, respectively. These functions are documented on page 124 of the "Microsoft Windows Device Driver Kit: Device Driver Adaptation Guide" for Windows 3.1 and on page 5-35 of the "Microsoft Windows Device Development Kit Device Driver Adaptation Guide" for Windows 3.0.

When an application calls the SetDIBitsToDevice() function, the Windows graphics device interface (GDI) determines if the driver supports mapping a device-independent bitmap (DIB) to the device by calling the GetDeviceCaps function with the RC_DIBTODEV value. If so, GDI calls the driver using ordinal 21. If not, GDI performs the work to map a DIB to the device.

When an application calls the StretchDIBits() function, GDI determines if the driver supports stretching DIBs by calling the GetDeviceCaps() function with the RC_STRETCHDIB value. If so, GDI calls the driver using ordinal 28. If not, GDI performs the work to stretch a DIB.

The name of the function the printer driver uses to represent a particular ordinal value does not make any difference. However, we recommend using the original names assigned to these driver functions, SetDIBitsToDevice() and StretchDIBits().


Additional reference words: 3.00 3.10 DDK DDKPRINT
KBCategory: kbprg
KBSubcategory: D2PrnPscript


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 16, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.