BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HP LaserJet 2600N Floating Point Overflow

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder
View previous topic :: View next topic  
Author Message
Yak
Guest





PostPosted: Mon Jun 05, 2006 7:06 pm    Post subject: HP LaserJet 2600N Floating Point Overflow Reply with quote



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
Back to top
Yak
Guest





PostPosted: Thu Jun 29, 2006 6:18 pm    Post subject: Re: HP LaserJet 2600N Floating Point Overflow Reply with quote



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.
Back to top
Yak
Guest





PostPosted: Thu Jun 29, 2006 6:31 pm    Post subject: Re: HP LaserJet 2600N Floating Point Overflow Reply with quote



I forgot...
Thank you Greg!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.