PDA

View Full Version : Printing and DOS within Windows OS



kes103
03-24-2002, 11:44 PM
I've been hearing that some of the older programs won't
print or won't print properly from the windows operating
system. Also, the word out is that the newer printers don't
support DOS anymore. Prior to the Windows API and drivers, I always used machine code (usually some sort of hexidecimal code) to send instructions such as "set to compressed mode" to the printers. It seems to me that these should still work if they can reach the printer. Can anyone offer any clarification on this issue.
:confused:

DavidP
03-25-2002, 10:18 PM
They should still work. They have almost always worked for me. I have had an experience, however, using C++Builder where I used the standard PRN file using fstreams in fstream.h, where for some reason it would not work on my printer, but would work on the older school printers. However, when I changed compilers, it worked perfectly fine on my printer. It seemed to just be a problem with C++Builder.

If worse comes to worse, I am sure you could always reformat your output to be Windowsyfied.

sean
04-03-2002, 10:20 AM
I found your question a little hard to follow, so I'l give some advice that just relates to the topic:

- If you want to access dos, you can use system() to start command.com

- iostream.h's cprn function should work as long as the program is a console application.

- The hexadecimal should work as long as it is specified in the program as hexadecimal somehow. It all get reduced down to machine code anyway.

- A question of my own. To use ASCII 01 - 1F(hex) do you just add them to the string and the printer will follow them?

VirtualAce
04-03-2002, 08:42 PM
C'mon the proper way to access DOS is via int 21h. Every function you need in DOS is there. Check out the RBIL listing and go from there.

Also, people, take system() and feed it to the dogs, ok. Using system() to execute DOS commands is rather primitive.