Hello I think I found my (or better a :) problem with fonts. The function GetObject <MSDN> int GetObject( HGDIOBJ hgdiobj, // handle to graphics object int cbBuffer, // size of buffer for object information LPVOID lpvObject // buffer for object information ); </MSDN> should either return the info in the object buffer or, if this pointer is zero, just the size the required info would need. <MSDN> If the lpvObject parameter is NULL, the function return value is the number of bytes required to store the information it writes to the buffer for the specified graphics object. </MSDN> But I couldn't find this anywhere, not in the general function in gdiobj.c nor in the subtypes FONT_GetObject or BRUSH_GetObject (sure others neither). As my app uses this feature Wine tries to memcpy to a NULL pointer and jumps out of the window... literally :) bye Fabi
"Fabian" == Fabian Cenedese <Cenedese(a)indel.ch> writes:
... Fabian> <MSDN> If the lpvObject parameter is NULL, the function return Fabian> value is the number of bytes required to store the information Fabian> it writes to the buffer for the specified graphics object. Fabian> </MSDN> Fabian> But I couldn't find this anywhere, not in the general function Fabian> in gdiobj.c nor in the subtypes FONT_GetObject or Fabian> BRUSH_GetObject (sure others neither). As my app uses this Fabian> feature Wine tries to memcpy to a NULL pointer and jumps out of Fabian> the window... literally :) FONT_GetObject sure checks: if(buffer) memcpy( buffer, &lfA, count ); return count; BRUSH_GetObject does not: if (count > sizeof(brush->logbrush)) count = sizeof(brush->logbrush); memcpy( buffer, &brush->logbrush, count ); return count; Someone has to carefully check all subtypes... Bye -- Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
participants (2)
-
Fabian Cenedese -
Uwe Bonnes