SetDefaultPrinter (winspool)
Last changed: -179.178.48.53

.
Summary
Sets the default printer for a user. Only supported for Windows 2000 and above.

C# Signature:

    [DllImport("winspool.drv", CharSet=CharSet.Auto, SetLastError=true)]
    public static extern bool SetDefaultPrinter(string Name);

VB Signature:

Declare Function SetDefaultPrinter Lib "winspool.dll" (TODO) As TODO

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

SetDefaultPrinter("\\Smith3\OkiPrn1");

Alternative Managed API:

Do you know one? Please contribute it!

Documentation