Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using C programs to print with Windows XP

Status
Not open for further replies.

FireLover

Automotive
Jun 21, 2001
27
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor