The information in this article applies to:
SUMMARYGetDIBits() retrieves the bits of a specified bitmap and copies them, in device-independent format, into the buffer that is specified in the lpBits parameter. If the lpBits parameter is NULL, GetDIBits fills in the BITMAPINFO data structure to which the lpBitsInfo parameter points, but does not retrieve bits from the bitmap. The application must ensure that the BITMAPINFO data structure passed in the GetDIBits call contains valid data before making the GetDIBits call. This article describes how Windows verifies that the data in the BITMAPINFO structure is valid. MORE INFORMATION
When NULL is specified as the lpBits parameter of GetDIBits, the function
will ensure that the structure passed in to it contains valid data. Then,
the function sets the biSizeImage field of the BITMAPINFOHEADER structure and the bmiColors field of the BITMAPINFO structure.
NOTE: For Windows 95 and Windows NT, the following line
should be changed to:
All these conditions must be true if GetDIBits is to function correctly and
return valid data (either by setting the biSizeImage field or by returning
the DIB's bits).
If any of these conditions is not true, the header is invalid, and GetDIBits returns 0 (zero). GetDIBits is performed on the device driver level. Because different devices may use different formats to store data, only the device knows its particular format. Thus, it is the responsibility of the driver to convert the device format to a device-independent format. If the device driver is not completely reliable, then GetDIBits may return erroneous information. This should be considered when using GetDIBits. Additional query words: 3.00 3.10
Keywords : kbWinOS310 kbDSupport kbWinOS300 kbSDKWin16 |
Last Reviewed: July 14, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |