Originally posted by Michael Mattias
View Post
Announcement
Collapse
No announcement yet.
rundll32 printui.dll,PrintUIEntry Question
Collapse
X
-
-
I'l be honest, I can't imagine what kind of application would want to, " delete[] a bunch of printers and add[] new ones. .... don't care [on add if ] the printer was found.."
Except- maybe - some kind of printer-testing software?
Pray enlighten me?
Leave a comment:
-
Thank you Michael
I don't have a need for the API, hence it never crossed my mind to look.
Doug
Leave a comment:
-
????
DeletePrinter
The DeletePrinter function deletes the specified printer object.
Code:BOOL DeletePrinter( HANDLE hPrinter // handle to printer object );
hPrinter
[in/out] Handle to a printer object that will be deleted. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
AddPrinter
The AddPrinter function adds a printer to the list of supported printers for a specified server.
Code:HANDLE AddPrinter( LPTSTR *pName, // server name DWORD Level, // printer information level LPBYTE pPrinter // printer information buffer );
Leave a comment:
-
rundll32 printui.dll,PrintUIEntry Question
I have a down and dirty app that deletes a bunch of printers and adds new ones. I don't care, at least at the point of adding, whether or not the printer was found or not so I am using the /q option to suppress errors. What I am finding is that if the printer can not be found it still throws the windows error saying it can not connect to the printer even though I am using the /q option. Does anyone know how I can suppress this message? Maybe that is the problem, Windows doesn't treat the can not connect to the printer as an actual error message? Is there another way I can add the printers?
Here is the simple line of code. All I do is add the printers line by line with a shell statement
Code:rundll32 printui.dll,PrintUIEntry /in /q /n\\PrimaryDomain\ExpediteRed
Last edited by Douglas C. Horner; 15 Apr 2008, 03:14 PM.Tags: None
Leave a comment: