DeletePrinterConnection, AddPrinterConnection 
Author Message
 DeletePrinterConnection, AddPrinterConnection

Hi all,

I'm trying to get a couple of functions to work for me.
AddPrinterConnection and DeletePrinterConnection.  These functions work just
great for shares from an NT server.

for example if printserver1 was a NT 4.0 Server with a printer called
printer1 I could do the following with no problem.

AddPrinterConnection("\\printserver1\printer1")
DeletePrinterConnection("\\printserver1\printer1")

This would successfully add and remove the printer connection from the local
client.

What I'm having problems with is how to perform the same function when the
printer is located on a WIN95 machine.  What I get from GetLastError() is
1801 ERROR_INVALID_PRINTER_NAME.

I am absolutely certain that the share name is correct.  I can go to a DOS
prompt and type net use lpt3 \\printserver2\printer2 with no problem so I
was hoping someone had a explanation on what I'm doing wrong or what is
different with this API against a WIN95 machine.

Thanks,

Matt Nielsen



Sat, 02 Feb 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. DeletePrinterConnection desn't work

2. Problem with AddPrinterConnection

3. AddPrinterConnection in Win2000 Server

4. WSH 2.0 and the AddPrinterConnection ?

5. addprinterconnection

6. API AddPrinterConnection

7. Getting AddPrinterConnection Error

8. AddPrinterConnection fails: 1797: Unknown printer driver

9. AddPrinterConnection

10. Getting AddPrinterConnection Error

 

 
Powered by phpBB® Forum Software