Microsoft KB Archive/151072

{|
 * width="100%"|

BUG: GetObject Returns Partial Information for DIBSections

 * }

Q151072

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used 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[ASCII 146]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.

Additional query words: 4.00 DIB CreateFileMapping MapViewOfFile

Keywords : kbSDKWin32 kbOSWin95 kbDSupport

Issue type : kbbug

Technology : kbAudDeveloper kbWin32sSearch kbWin32API