Thread: Printing and DOS within Windows OS

  1. #1
    Registered User
    Join Date
    Dec 2001

    Printing and DOS within Windows OS

    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.

  2. #2
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Plano, Texas, United States
    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.
    My Website

    "Circular logic is good because it is."

  3. #3
    Super Moderator
    Join Date
    Sep 2001
    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

    - 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?

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C# Printing Problem
    By silverlight001 in forum C# Programming
    Replies: 0
    Last Post: 03-23-2009, 01:13 AM
  2. graphics printing in tc 3.0 in dos
    By satyendra in forum A Brief History of
    Replies: 1
    Last Post: 07-22-2003, 07:08 AM
  3. printing to a dos window, with specified co-ordinates?
    By $0.05$ in forum C++ Programming
    Replies: 3
    Last Post: 02-19-2003, 08:50 PM
  4. dos printing
    By cozman in forum A Brief History of
    Replies: 1
    Last Post: 08-11-2001, 07:55 AM