×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Using C programs to print with Windows XP

Using C programs to print with Windows XP

Using C programs to print with Windows XP

(OP)
I am a beginner learning to program C. My PC runs Windows XP and I am experiencing a problem.  When I try to send data to the printer string (stdprn), absolutely nothing comes out on the printer.  The program runs as if nothing is wrong, except that anything sent to the printer stream disappears.  The same thing happens when I try to redirect program output to the printer (ie. prog>prn) or type a text file to the printer (ie. type prog.c>prn).  I do not have this problem on another computer that runs on Windows 98.  I have been told that XP limits access to all devices in this way.  If it matters, I am using borland C compiler 5.5.1 (free for students).

My questions are: 1)why does XP act this way, and 2)how can I send data (any data in stdprn) to my printer from within a C program using Windows XP?  I know I can send it to a file and print it from within notepad or some other program.  However, there has got to be a better way when writting programs.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources