El 28/12/2013 10:11, www[dot]eMeAsOfT[dot]com escribió:
> Hello Xailers,
>
> The GPF errors is still happening... and we have no idea
> why, because it does not happens in all costumers.
>
> Here are two GPF:
The first one happens in TRichEdit:Print() method, and there is only one
line that can cause a "Divide by Zero" exception:
SetRect( &rect, 0, 0, GetDeviceCaps( hDC, PHYSICALWIDTH ) * 254 /
GetDeviceCaps( hDC, LOGPIXELSX ),
GetDeviceCaps( hDC, PHYSICALHEIGHT ) * 254 /
GetDeviceCaps( hDC, LOGPIXELSY ) );
And it's only possible if:
1) you have no printer at all in your computer.
2) you have a printer which driver is giving 0 for LOGPIXELSX or
LOGPIXELSY (it's almost impossible).
3) you are sending an incorrect value in the second parameter. This
second parameter must be a valid hDC. If it's not passed, then Xailer
uses the current printer DC. So, if you are not sure about it, just
don't send the second parameter (or send NIL).
Regarding the second GPF, it seems you are using some kind of COM
library to send data through serial port. And it seems that this library
has buggy and is causing the GPF.
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info