Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Printer, Network related

Status
Not open for further replies.

Uniquex

Programmer
Dec 16, 2002
15
SG
Currently I have a program that :

- Get and holds detailed local printer information and stores it in a pre-defined Structure
- Gets and holds print jobs¡¯ detailed information in the window printer queue in a pre-defined Structure
- Sends a print job from one printer queue to another

This program makes extensive use of Win32 printer APIS

But the problem is all this can only done on a local printer(default).
The program sends jobs to the print queue by sending to the local printer port; Using the CopyFile() method.

I need to be able to send jobs from one PC¡¯s printer queue to another in a network.
So I can¡¯t just send it to a port because multiple printers would be using the same port number on their own PCs.

So I need to be able to :
- Get information about all the printers currently connected the to the network
- Find a way to send print jobs from my local queue to the chosen Pc¡¯s print queue(another in the network)

Which win32 APi s can help me achieve these? Any other advice would also be appreciated!

Thank you in advance !

Uniquex
 
Hi,

It's not a case of finding what printers are available on the network is more of a case of finding what remote printers you have access to.

You need to iterate over the printers using the EnumPrinters function, to see what's available to you since these resources can be permission based.

HTH
--
William
Software Engineer
ICQ No. 56047340
 
thanks you willamu, i have refined my direction.

maybe you could help me out in the below: ?

thanks
 
Hi guys,

I think my previous post was too vague, I came up with a new solution(tedious but easier) and now I have something else to ask, hope u guys can help.

As there will be a central PC allocated to act as server, I would install all the networked printers¡¯ driver on the central pc as SHARED Printers.

Since the program currently works by using the CopyFile() method; destination set to the printport, e.g. ¡®LPT1¡¯

I would have to set the destination of copyFile() to the pc¡¯s printer port, e.g. \\server\PC1\printer port
But I was wondering what details must I include in the path to access the directory/print port of another networked PC

e.g. instead of \\server\Pc1\folder, I want \\server\Pc1\print port

can i just say use CopyFile() with &quot;\\server\PC1\LPT1&quot; <---valid?

Above is the backgrd information !

In short, I am asking what details must I include In the path to access a Shared network printer¡¯s port.

Thanks again =)

Uniquex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top