[GDI] GetObject patch (for null buffer functionality)

Kelly Leahy kellyleahy at swbell.net
Fri Jun 6 10:39:43 CDT 2003

I just found a problem with this patch.  Let me send another one...

I'll have it this afternoon.  It shouldn't be a big deal (it won't be worse than the code was before) but let me fix it anyway.

  ----- Original Message ----- 
  From: Kelly Leahy 
  To: wine-patches at winehq.com 
  Sent: Friday, June 06, 2003 10:22 AM
  Subject: [GDI] GetObject patch (for null buffer functionality)

  Kelly Leahy
  kellyleahy at swbell.net

    - 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).

    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-patches/attachments/20030606/979ae1f3/attachment.htm

More information about the wine-patches mailing list