473,386 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to spool LPT1 on win98?

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);
}
Jul 22 '05 #1
1 2245
Allan wrote:
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

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chuck Rittersdorf | last post by:
Hi There I am having a problem using the win32 API from VB6. I am trying to send a command string to a printer(zebra TLP 2742) on LPT1 using the folowing API functions CreateFile and...
0
by: Thomas R. Hummel | last post by:
Hello, I have a table which has a few million records. It has an IDENTITY column that serves as the primary key. In a part of our application here, a previous record may need to be copied as a...
1
by: david_0 | last post by:
What causes the query optimizer to choose a table spool\lazy spool action in the execution plan? The explanation of "optimize rewinds" makes little sense because my query never comes back to that...
0
by: Nick | last post by:
Hi guys, I have an old VB app that writes just fine to an old LPT printer. I do this using: Open "LPT1" .... Now, the app is changing and I have to do the same thing in .NET. I found at...
5
by: Tom | last post by:
I am converting an old application that was printing directly to a specialized printer device (i.e. a special label printer). It was doing this by opening a file with the file path of 'LPT1:' and...
0
by: Robert | last post by:
Greetings, In Google I am finding what the deffinition of a table spool operator is but not what it is doing to performance. The execution plan shows the output of a clustered Index scan (54...
3
by: nimmiejoey | last post by:
Hello everybody, could you please tell me the meaning of the command outport(LPT1,00)
1
by: orajit | last post by:
I Have created following PL/sql blok DECLARE vl_n_cnt NUMBER:=0; vl_max_date varchar2(100); CURSOR c1 IS SELECT CREATED_DTM,EVENT_DTM,ACCOUNT_NUM,EVENT_COST_MNY,EVENT_TYPE_ID ...
1
by: akaley | last post by:
HI.. iam using Spool ..for loading the data into file from select statement.. iam facing some problems...Please give me u r valuable suggestion.. This is the sample code used by me.. set...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.