PDA

View Full Version : Printing a File or Monitor content on a printer in C/c++


Andreas
09-21-04, 12:46 AM
Hello there!
Does anyone know how I can print a file or monitor contents on a printer in C/C++ language :confused: ?

Naresh Rohra
10-01-04, 06:31 PM
The data printed on Monitor is stored in address location 0xB8000000.

do u know how to execute dos commands from C/C++, frankly I don't know. If yes then its simple.
So, if u want to print from monitor, store memory contents in file1.txt and then execute following dos command.
C:\> File1.txt >> prn '*** This will redirect the contents of File.txt to Printer Exe file...prn
In second case directly print the file using above command.

Also reply me how to execute DOS command in C/C++ if u know.

Cheers.
Naresh Rohra.