Home > Archive > Clipper > November 2004 > I need Help with XP and clipper and slow printing
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
I need Help with XP and clipper and slow printing
|
|
| AlNofCa 2004-11-16, 6:43 pm |
| I have an application which I just switched to a DOS window on XP for a client.
I have tried adding IAMIDLE but am still having the same problem with the
printer pausing during printing.
The IAMIDLE.OBJ file that I'm using(supposedly the latest with all the "bugs"
fixed
is dated 05/01/1997 3:05AM 297 Bytes
Below is the call to in the main program, PBMAIN and the linker script
This is where I've entered the call to FT_ONIDLE in the main program, PBMAIN
** << PBMAIN - MAIN MENU >> **
FT_ONIDLE({FT_IAmIdle(99,.T.)})
oldcolor := setcolor()
ForSale := { ||ChkType() }
mFAILEDM := SETUP(mmHELP)
DO WHILE .NOT. mFAILEDM
program loop
..............
I use RTLINK as my linker
FI PBMAIN
FI IAMIDLE
FI PBPRO, PBPRO1, PBPRO2, PBPRO3, PRO_FUNC, PB501
FI PBA, PBA1, PBB, PBC, PBD, PBE, PBF, PBH, PBI, PBJ, PBK, PBK1, PBL, PBM
FI PBY, PBZ, P_ERR
LIB C:\CLIP52\lib\clipper
LIB C:\CLIP52\lib\extend
LIB C:\CLIP52\lib\nanfor
LIB C:\CLIP52\lib\nt250
LIB C:\CLIP52\lib\cpmi
OUTPUT PAWN501K
Any help or suggestions would be greatly appreciated by me and especially by my
client.
Al Nystrom in Sacramento, CA
| |
| Ross McKenzie 2004-11-16, 6:43 pm |
| On 10 Nov 2004 20:12:40 GMT, alnofca@aol.com (AlNofCa) wrote:
>I have an application which I just switched to a DOS window on XP for a client.
> I have tried adding IAMIDLE but am still having the same problem with the
>printer pausing during printing.
>The IAMIDLE.OBJ file that I'm using(supposedly the latest with all the "bugs"
>fixed
>is dated 05/01/1997 3:05AM 297 Bytes
>Below is the call to in the main program, PBMAIN and the linker script
>
>This is where I've entered the call to FT_ONIDLE in the main program, PBMAIN
>
>** << PBMAIN - MAIN MENU >> **
>
>FT_ONIDLE({FT_IAmIdle(99,.T.)})
>
>
>Any help or suggestions would be greatly appreciated by me and especially by my
>client.
>Al Nystrom in Sacramento, CA
Hi Al,
I think your line is incorrect. This needs to be a codeblock, so...
FT_ONIDLE( { || FT_IAmIdle(99,.T.) } )
Hope that helps.
Regards,
Ross McKenzie
ValuSoft
Melbourne Australia
valusoft AT optushome DOT com DOT au
| |
| AlNofCa 2004-11-16, 6:43 pm |
| Ross, I was really hopeful that that would help, but same results.
| |
| Ross McKenzie 2004-11-16, 6:43 pm |
| On 10 Nov 2004 23:26:52 GMT, alnofca@aol.com (AlNofCa) wrote:
>Ross, I was really hopeful that that would help, but same results.
OK Al, lets start from first principles...
If you are running on a Windows box, you should be able to monitor the
cpu usage meter to confirm that the iamidle code is working correctly.
Expect a 1-2% figure with higher peaks matching disk activity. What do
you get?
Are all applications on this XP printer subject to the same
start/pause/finish print cycle? Other DOS apps? If yes, changes in
your Clipper code are unlikely to solve it.
Some time ago, there was a solution suggested associated with a
timeout setting in registry. Detecting the need for changing this
timeout setting involved using this code...
cFile := "TEST.PRN"
set printer to (cFile)
...
set printer to
run ("COPY " + cFile + " PRN")
"If this is faster, your problem is the timeout." Frank circa 2001
Are you flushing your print job correctly? As in, calling this
function at the end of your printing code (after the eject if you have
one).
FUNCTION PRCOMMIT()
#include "set.ch"
local cPrinter := set( _SET_PRINTFILE, "LPT3" )
set( _SET_PRINTFILE, "LPT2" )
set( _SET_PRINTFILE, "LPT1" )
set( _SET_PRINTFILE, "" )
// restores the original printer-port!
set(_SET_PRINTFILE, cPrinter, .t.)
return nil
That is all that I can think of for the moment...
Regards,
Ross McKenzie
ValuSoft
Melbourne Australia
valusoft AT optushome DOT com DOT au
| |
| AlNofCa 2004-11-16, 6:43 pm |
| I did note that cpu usage is 100% so I assume something is not correct in my
implementation.????
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Al,
>Ross, I was really hopeful that that would help, but same results.
Your link script looks fine, and with the syntax Ross gave you
FT_IAmIdle() should work as advertised.
What does Performance Monitor say about processor usage when the
application is idle at a wait state? If it says something like 1-2%
then FT_IAmIdle() is doing what it is supposed to do, and we need to
look elsewhere for the cause of your slow printing.
Could you describe the slowness in a little more detail? How long is
the pause? Is the print speed normal before and after the pause? Is
there more than one pause in each job?
How do you set up the print job and how do you finish it? Are you sure
that the spooler is properly flushed? Do you start with SET PRINTER TO
LPT1 (or LPT2 or LPT3) and finish with SET PRINTER TO (without a port
name)? Do you eject before the final SET PRINTER TO?
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Al,
>I did note that cpu usage is 100% so I assume something is not correct in my
>implementation.????
Hmm, have you checked that the linker can actually find iamidle.obj?
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| AlNofCa 2004-11-16, 6:43 pm |
| The performance monitor shows 100% and typically about 3/4 of a page prints.
It's the same on another clipper program that I wrote when I test it on XP. It
doesn't appear that that that the IAMIDLE is being linked.??? I eject at the
end of the print.
I start a print job with
Set console off
set device to print
set print on
end the print with
an eject
set console on
set device to screen
set console on
| |
| AlNofCa 2004-11-16, 6:43 pm |
| how do I check to see if the linker found iamidle.obj???
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Al,
>The performance monitor shows 100% and typically about 3/4 of a page prints.
>It's the same on another clipper program that I wrote when I test it on XP. It
>doesn't appear that that that the IAMIDLE is being linked.??? I eject at the
>end of the print.
As I mentioned in a later post, you need to verify that the linker can
find iamidle.obj. If it can't, it will link the old version from
nanfor.lib instead. An easy test is to comment out nanfor.lib from the
link script. If the linker complains about FT_OnIdle() but not
FT_IAmIdle(), then iamidle.obj is linked in. That's the CPU hogging
part of the problem.
The printing part is actually a different problem. The spooler is
never flushed, so it is waiting for the system-defined timeout before
it releases the print job. Add the two lines below to take care of
that.
>I start a print job with
set printer to lpt1 (or lpt2 or lpt3)
>Set console off
>set device to print
>set print on
>end the print with
>an eject
>set console on
>set device to screen
>set console on
set printer to
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| AlNofCa 2004-11-16, 6:43 pm |
| Klas
I changed the printer open and close as you suggested and now the page prints
completely with no pause. So that takes care of the imediate problem with my
client. I did as you suggested and commented out the nanfor.lib and I get the
message that FT_ONIDLE unresovled external. So what does that mean or what's
the solution?
And btw, thanks for your help.
Al
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Al,
>I changed the printer open and close as you suggested and now the page prints
>completely with no pause. So that takes care of the imediate problem with my
>client.
Excellent! Here is a little trick you might want to take under
consideration. I you move the SET PRINTER TO commands to a UDF and
pass the port name to it, like this ...
SETPRINTER('LPT1')
....
SETPRINTER('')
.... for example, then you can later on make system-wide changes, like
providing alternate printing to a file that you copy to the printer,
or other interesting tricks with very little effort.
>I did as you suggested and commented out the nanfor.lib and I get the
>message that FT_ONIDLE unresovled external. So what does that mean or what's
>the solution?
That means that the linker does find iamidle.obj and the reason that
you still see 100% CPU usage lies elsewhere. I have sent a file to
your AOL account. Let me know if it helps.
>And btw, thanks for your help.
You're welcome
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| AlNofCa 2004-11-16, 6:43 pm |
| Thanks for the suggestion for a UDF. Could you send whatever you sent to my
AOL account to my other e_mail address. I have AOL mail off because of the
SPAM. My other address is javadad@sbcglobal.net.
Thanks
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Al,
>Thanks for the suggestion for a UDF. Could you send whatever you sent to my
>AOL account to my other e_mail address. I have AOL mail off because of the
>SPAM. My other address is javadad@sbcglobal.net.
Yes, it came back with a message saying your AOL account is not
accepting mail. I have sent it to the other account now.
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| AlNofCa 2004-11-16, 6:43 pm |
| Thanks, Klas
Al
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Al,
>I changed the printer open and close as you suggested and now the page prints
>completely with no pause. So that takes care of the imediate problem with my
>client.
Excellent! Here is a little trick you might want to take under
consideration. I you move the SET PRINTER TO commands to a UDF and
pass the port name to it, like this ...
SETPRINTER('LPT1')
....
SETPRINTER('')
.... for example, then you can later on make system-wide changes, like
providing alternate printing to a file that you copy to the printer,
or other interesting tricks with very little effort.
>I did as you suggested and commented out the nanfor.lib and I get the
>message that FT_ONIDLE unresovled external. So what does that mean or what's
>the solution?
That means that the linker does find iamidle.obj and the reason that
you still see 100% CPU usage lies elsewhere. I have sent a file to
your AOL account. Let me know if it helps.
>And btw, thanks for your help.
You're welcome
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| Sandeep Raja Rao 2004-11-16, 6:43 pm |
| Ooops, never tried set printer to LPT1
Thanks a lot.
I should also try the same!
Best regards
Sandeep
"Klas Engwall" <klas.engwall@nospam.please> wrote in message
news:4193431c.43788694@nntpserver.swip.net...
> Al,
>
prints.[color=darkred]
XP. It[color=darkred]
the[color=darkred]
>
> As I mentioned in a later post, you need to verify that the linker can
> find iamidle.obj. If it can't, it will link the old version from
> nanfor.lib instead. An easy test is to comment out nanfor.lib from the
> link script. If the linker complains about FT_OnIdle() but not
> FT_IAmIdle(), then iamidle.obj is linked in. That's the CPU hogging
> part of the problem.
>
> The printing part is actually a different problem. The spooler is
> never flushed, so it is waiting for the system-defined timeout before
> it releases the print job. Add the two lines below to take care of
> that.
>
>
> set printer to lpt1 (or lpt2 or lpt3)
>
>
> set printer to
>
> Klas
>
> -------
> klas dot engwall at engwall dot com
>
> Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
---
All mails are certified virus free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.796 / Virus Database: 540 - Release Date: 11/13/2004
| |
| Klas Engwall 2004-11-16, 6:43 pm |
| Sandeep,
>Ooops, never tried set printer to LPT1
>I should also try the same!
Yes! <bg>
Regards,
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| Klas Engwall 2004-11-18, 8:55 pm |
| Al,
>I changed the printer open and close as you suggested and now the page prints
>completely with no pause. So that takes care of the imediate problem with my
>client.
Excellent! Here is a little trick you might want to take under
consideration. I you move the SET PRINTER TO commands to a UDF and
pass the port name to it, like this ...
SETPRINTER('LPT1')
....
SETPRINTER('')
.... for example, then you can later on make system-wide changes, like
providing alternate printing to a file that you copy to the printer,
or other interesting tricks with very little effort.
>I did as you suggested and commented out the nanfor.lib and I get the
>message that FT_ONIDLE unresovled external. So what does that mean or what's
>the solution?
That means that the linker does find iamidle.obj and the reason that
you still see 100% CPU usage lies elsewhere. I have sent a file to
your AOL account. Let me know if it helps.
>And btw, thanks for your help.
You're welcome
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| Sandeep Raja Rao 2004-11-18, 8:55 pm |
| Ooops, never tried set printer to LPT1
Thanks a lot.
I should also try the same!
Best regards
Sandeep
"Klas Engwall" <klas.engwall@nospam.please> wrote in message
news:4193431c.43788694@nntpserver.swip.net...
> Al,
>
prints.[color=darkred]
XP. It[color=darkred]
the[color=darkred]
>
> As I mentioned in a later post, you need to verify that the linker can
> find iamidle.obj. If it can't, it will link the old version from
> nanfor.lib instead. An easy test is to comment out nanfor.lib from the
> link script. If the linker complains about FT_OnIdle() but not
> FT_IAmIdle(), then iamidle.obj is linked in. That's the CPU hogging
> part of the problem.
>
> The printing part is actually a different problem. The spooler is
> never flushed, so it is waiting for the system-defined timeout before
> it releases the print job. Add the two lines below to take care of
> that.
>
>
> set printer to lpt1 (or lpt2 or lpt3)
>
>
> set printer to
>
> Klas
>
> -------
> klas dot engwall at engwall dot com
>
> Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
---
All mails are certified virus free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.796 / Virus Database: 540 - Release Date: 11/13/2004
| |
| Klas Engwall 2004-11-18, 8:55 pm |
| Sandeep,
>Ooops, never tried set printer to LPT1
>I should also try the same!
Yes! <bg>
Regards,
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
| |
| Sandeep Raja Rao 2004-11-21, 8:55 pm |
| Ooops, never tried set printer to LPT1
Thanks a lot.
I should also try the same!
Best regards
Sandeep
"Klas Engwall" <klas.engwall@nospam.please> wrote in message
news:4193431c.43788694@nntpserver.swip.net...
> Al,
>
prints.[color=darkred]
XP. It[color=darkred]
the[color=darkred]
>
> As I mentioned in a later post, you need to verify that the linker can
> find iamidle.obj. If it can't, it will link the old version from
> nanfor.lib instead. An easy test is to comment out nanfor.lib from the
> link script. If the linker complains about FT_OnIdle() but not
> FT_IAmIdle(), then iamidle.obj is linked in. That's the CPU hogging
> part of the problem.
>
> The printing part is actually a different problem. The spooler is
> never flushed, so it is waiting for the system-defined timeout before
> it releases the print job. Add the two lines below to take care of
> that.
>
>
> set printer to lpt1 (or lpt2 or lpt3)
>
>
> set printer to
>
> Klas
>
> -------
> klas dot engwall at engwall dot com
>
> Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
---
All mails are certified virus free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.796 / Virus Database: 540 - Release Date: 11/13/2004
| |
| Klas Engwall 2004-11-21, 8:55 pm |
| Sandeep,
>Ooops, never tried set printer to LPT1
>I should also try the same!
Yes! <bg>
Regards,
Klas
-------
klas dot engwall at engwall dot com
Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
|
|
|
|
|