----- Original Message -----
Sent: Friday, June 06, 2003 10:22
AM
Subject: [GDI] GetObject patch (for null
buffer functionality)
- fixes problems with GDI GetObject
function not working properly when a NULL buffer or 0 count is
used.
- note - no attempt was made to fix this
problem under 16-bit windows functions (GetObject16).
Description:
The GDI GetObject function should return
the number of bytes required for the buffer, when a NULL buffer pointer is
passed to the function. However, the implementation in CVS did not
provide this functionality. I've added two function pointers to the
gdi_obj_funcs structure that allow for this functionality. The pointers
are pGetObjectSizeA and pGetObjectSizeW, and for all object types except FONT,
they are implemented by the same function. On FONT, the structure
differs depending on whether the LOGFONTA or LOGFONTW structure is required
(depends on which function is called - GetObjectA or GetObjectW). For
bitmaps, the function must determine which structure is most appropriate
(BITMAP or DIBSECTION) and return the size of that structure - it does so
now.
Patch is attached.