Results 1 to 2 of 2

Thread: network printer

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    italy
    Posts
    5

    network printer

    Hi all,
    in my C program, when i want to print on a local printer, i use this:

    FILE *prn = fopen("lpt1", "w");

    Could you give me the equivalent statement in a case of network printer (that is not on lpt1)?

    Maybe i could use a batch file with:

    C:\> print \\servername\print_share

    but i cannot find the equivalent of shell in C.

    Could you help me?

    Thanks.

    Chiara

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    In Windows, you need to specifically open the printer device (see MSDN). However, NT might have an lpr port (Unix is so much easier in this respect) that you can send data to and it'll print it.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width