How to spool LPT1 on win98?

A

Allan

I open and write LPT1 as file with standart file i/o functions. But it
sends directly to the printer on win98 without spooling.But when I
send something from command prompt (dos) to LPT1 it is spooled. Is
there a way that I can
use LPT1 and spooling using C?

*1 I tried open/write and fopen/fputs functions
*2 Spooling is turned on on printer's properties
Example code:

FILE *fp=NULL;
fp = fopen("LPT1", "w");
if (fp)
{
fprintf(fp, "test\n");
fclose(fp);
}
 
T

Thomas Matthews

Allan said:
I open and write LPT1 as file with standart file i/o functions. But it
sends directly to the printer on win98 without spooling.But when I
send something from command prompt (dos) to LPT1 it is spooled. Is
there a way that I can
use LPT1 and spooling using C?

*1 I tried open/write and fopen/fputs functions
*2 Spooling is turned on on printer's properties
Example code:

FILE *fp=NULL;
fp = fopen("LPT1", "w");
if (fp)
{
fprintf(fp, "test\n");
fclose(fp);
}

Spooling is outside the domain of the C++ language
and thus not discussed here. Operating systems take
care of spooling and other resources such as printers
and harddrives.

Try a newsgroup that discusses your operating system.
Read the C++ FAQ and welcome.txt in my signature.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top