New DLL request: printui

Announcements and discussion for PInvoke

Moderators: Luke Jefferson, Robert

New DLL request: printui

Postby sonyman » Wed Sep 02, 2009 11:10 am

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

C# Signature:

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


Sample:

Code: Select all
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
sonyman
 
Posts: 1
Joined: Wed Sep 02, 2009 11:00 am
Location: Germany

Postby Brian Donahue » Fri Sep 04, 2009 9:37 am

I have added the printui module to PInvoke. Please let us know if there are any problems setting up your new pages.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 0 guests