Red Gate forums :: View topic - New DLL request: printui
Return to RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
PInvoke.Net forum

New DLL request: printui

Search in PInvoke.Net forum
Post new topic   Reply to topic
Jump to:  
Author Message

Joined: 02 Sep 2009
Posts: 1
Location: Germany

PostPosted: Wed Sep 02, 2009 11:10 am    Post subject: New DLL request: printui Reply with quote

I would like to add the following code to the wiki, but there is no "printui" library available.

C# Signature:

[DllImport("printui.dll", EntryPoint = "PrintUIEntryW", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern void PrintUIEntry(IntPtr hwnd, IntPtr hinst, string lpszCmdLine, int nCmdShow);


Add per machine printer connection  (the connection will be propagated to the user upon logon):
PrintUIEntry(IntPtr.Zero, IntPtr.Zero, @"/c \\machine /ga /n\\server\queue", 0);

Delete per machine printer connection (the connection will be deleted upon user logon):
PrintUIEntry(IntPtr.Zero, IntPtr.Zero, @"/c \\machine /gd /n\\server\queue", 0);

Could you please add it?

Thank you,
Daniel Krebs
Back to top
View user's profile Send private message
Brian Donahue

Joined: 23 Aug 2004
Posts: 6675

PostPosted: Fri Sep 04, 2009 9:37 am    Post subject: Reply with quote

I have added the printui module to PInvoke. Please let us know if there are any problems setting up your new pages.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group