views:

34

answers:

1

I want to write a dummy printer driver which appears as a shared printer on a LAN and can accept print jobs; so when its installed on a computer other computers in the LAN can browse and add it as a usual shared network printer and send print jobs to it. I want to do this in c#, are there any better suggestions?

Can anyone tell me any information regarding this, tips, tools, reading material etc. anything!

+2  A: 

If you just want a printer that will accept jobs and not do anything with the data, you don't need to write your own printer driver. Just create a local printer, and when it asks you for the port create a new local port and give it the name NUL. From the Windows XP Professional Product Documentation:

If the printer is physically attached to the print server, select the appropriate local port. LPT1 through LPT3 represent parallel ports; COM1 through COM4 represent serial ports When a client prints to a printer port denoted as FILE, the client is prompted for the file name. If you decide to add a new local port you can enter one of the following:

  • A file name, such as C:\Dir\Filename. All jobs sent to this port are written to the named file, and each new job overwrites the last one.
  • The share name of a printer, such as \Server\Printer (URLs are not accepted). Jobs sent to this port are transferred over the network to the named share by the network redirector.

  • NUL. This specifies the null port, which you can use to test whether network clients can send jobs. Jobs sent to NUL are deleted without wasting paper or delaying real print jobs.

  • IR. Use this port to connect to infrared-enabled printers meeting Infrared Data Association (IrDA) specifications. If your hardware does not support IR, it will not be listed on the Ports tab.
Quartermeister
thank you very much I appreciate your answer very much. That fulfilled many of my questions.And yes I don't want to print the print jobs, just need to accept the print jobs and direct them to a desired real printer according to a print job routing table. Imagine 3 PCs. one is sending a print job to a dummy printer job acceptor software on another PC, and that pc then transfers it to a PC with a real printer. Thanks for your response, can u suggest me any reading materials or even topics, coz I have no idea, only the passion to do it is all I have. Also any suggestion is welcome! Thanks
Zerone