closeprinter (winspool)
Last changed: freckert-68.49.130.137-4.10.224.157

.
Summary
Closes a printer connection given a handle

C# Signature:

[DllImport("winspool.drv", SetLastError=true)]
static extern int ClosePrinter(IntPtr hPrinter);        

VB Signature:

<DllImport("winspool.drv", EntryPoint:="ClosePrinter", _
SetLastError:=True, _
ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Private Shared Function ClosePrinter(ByVal hPrinter As Int32) As Boolean
End Function

User-Defined Types:

None.

Notes:

As always, only do SetLastError=true if you actually intend to call GetLastError.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation