BUG: GetObject Returns Partial Information for DIBSections

Last reviewed: May 23, 1996
Article ID: Q151072
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface included with: Microsoft Windows 95

SYMPTOMS

The dshSection and dsOffset members of the DIBSECTION structure contain NULL when the GetObject function is called on a file-mapped DIBSection. These structure members should contain the handle to the file-mapping object and the offset that were passed into the original CreatDIBSection function call. Note that this is a problem only when DIBSections are created from file-mapping objects. Normally, NULLs are used in the hSection and dwOffset parameters of the CreateDIBSection function to ask Windows to allocate the DIBSection s memory. Under these conditions, GetObject would be expected to return NULL for these structure members.

RESOLUTION

To work around this problem, applications must cache the values passed to the CreateDIBSection function.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 4.00 DIB CreateFileMapping MapViewOfFile
KBCategory: kbprg kbgraphic kbbuglist
KBSubcategory: GdiBmp



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: May 23, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.