Board index » cppbuilder » HP LaserJet 2600N Floating Point Overflow

HP LaserJet 2600N Floating Point Overflow


2006-06-05 10:06:07 PM
cppbuilder30
Hello to everyone,
I have discovered a strange "incompatibility" between Laserjet 2600N
drivers and applications developed in Borland Builder or Delphi.
This incompatibility arises when this printer is configured as a shared
network printer by a print server (I am using Windows 2003 Server) and
not when is accessed directly from a local TCP/IP port.
I have developed some applications in Borland Builder 6.0 and no one
can print with this printer. I have tried several examples, downloaded
from Internet or the same examples of Borland installed with the
developing environment. In every application developed in Borland
Builder that I have tested, when the document is sent to the print
queue (that is, when the Windows API function EndDoc is called), so
when the dialogue with the printer driver is established, a "Floating
point overflow" exception is thrown.
This seems a sort of incompatibility between borland developing
environments and this printer. The strange thing is that this problem
arises also when I use directly Windows API functions for printing,
without using high level functions available in Borland (such as
TPrinter).
If someone else has experienced similar problems, let me know please.
Gianluca
 
 

Re:HP LaserJet 2600N Floating Point Overflow

Here the solution:
WORD Saved8087CW = Default8087CW;
Set8087CW(0x133F);
try{
Prntr->EndDoc();
}__finally
{
Set8087CW(Saved8087CW);
}
This tells to the floating point unit (FPU) to ignore floating point
errors.
 

Re:HP LaserJet 2600N Floating Point Overflow

I forgot...
Thank you Greg!
 

{smallsort}