Group: Forum Members
Posts: 414,
Visits: 2.8K
|
Edhy here is a class wrapping API printer calls that I am using. I see if i can pull an example using it from my code in a few. Public Class PrintAPI#Region "OpenPrinter"<DllImport( "winspool.drv", EntryPoint:="OpenPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function OpenPrinter(<InAttribute()> ByVal pPrinterName As String, _<OutAttribute()> ByRef phPrinter As Int32, _<InAttribute(), MarshalAs(UnmanagedType.LPStruct)> ByVal pDefault As PRINTER_DEFAULTS _) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="OpenPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function OpenPrinter(<InAttribute()> ByVal pPrinterName As String, _<OutAttribute()> ByRef phPrinter As Int32, _<InAttribute()> ByVal pDefault As Int32 _) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="OpenPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function OpenPrinter(<InAttribute()> ByVal pPrinterName As String, _<OutAttribute()> ByRef phPrinter As IntPtr, _<InAttribute()> ByVal pDefault As PRINTER_DEFAULTS _) As BooleanEnd Function#End Region#Region "ClosePrinter"<DllImport( "winspool.drv", EntryPoint:="ClosePrinter", _SetLastError:= True, _ExactSpelling:= True, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function ClosePrinter(<InAttribute()> ByVal hPrinter As IntPtr) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="ClosePrinter", _SetLastError:= True, _ExactSpelling:= True, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function ClosePrinter(<InAttribute()> ByVal hPrinter As Integer) As BooleanEnd Function#End Region#Region "GetPrinter"<DllImport( "winspool.drv", EntryPoint:="GetPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function GetPrinter _(<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpPrinter As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef lpbSizeNeeded As Int32) As BooleanEnd Function#End Region#Region "EnumPrinters"<DllImport( "winspool.drv", EntryPoint:="EnumPrinters", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumPrinters(<InAttribute()> ByVal Flags As ConstantEnumerations.EnumPrinterFlags, _<InAttribute()> ByVal Name As String, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpBuf As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcbReturned As Int32) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="EnumPrinters", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumPrinters(<InAttribute()> ByVal Flags As ConstantEnumerations.EnumPrinterFlags, _<InAttribute()> ByVal Name As IntPtr, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpBuf As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcbReturned As Int32) As BooleanEnd Function#End Region#Region "GetPrinterDriver"<DllImport( "winspool.drv", EntryPoint:="GetPrinterDriver", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function GetPrinterDriver _(<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute()> ByVal pEnvironment As String, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpDriverInfo As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef lpbSizeNeeded As Int32) As BooleanEnd Function#End Region#Region "EnumPrinterDrivers"<DllImport( "winspool.drv", EntryPoint:="EnumPrinterDrivers", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumPrinterDrivers(<InAttribute()> ByVal ServerName As String, _<InAttribute()> ByVal Environment As String, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpBuf As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcbReturned As Int32) As BooleanEnd Function#End Region#Region "SetPrinter"<DllImport( "winspool.drv", EntryPoint:="SetPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function SetPrinter _(<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute()> ByVal Level As Int32, _<InAttribute()> ByVal pPrinter As IntPtr, _<InAttribute()> ByVal Command As ConstantEnumerations.PrinterControlCommands) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="SetPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function SetPrinter _(<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute(), MarshalAs(UnmanagedType.U4)> ByVal Level As ConstantEnumerations.PrinterInfoLevels, _<InAttribute(), MarshalAs(UnmanagedType.LPStruct)> ByVal pPrinter As PRINTER_INFO_2, _<InAttribute(), MarshalAs(UnmanagedType.U4)> ByVal Command As PrinterControlCommands) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="SetPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function SetPrinter _(<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute(), MarshalAs(UnmanagedType.U4)> ByVal Level As PrinterInfoLevels, _<InAttribute(), MarshalAs(UnmanagedType.LPStruct)> ByVal pPrinter As PRINTER_INFO_3, _<InAttribute(), MarshalAs(UnmanagedType.U4)> ByVal Command As PrinterControlCommands) As BooleanEnd Function#End Region#Region "GetJob"<DllImport( "winspool.drv", EntryPoint:="GetJob", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function GetJob _(<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute()> ByVal dwJobId As Int32, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpJob As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef lpbSizeNeeded As Int32) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="GetJob", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function GetJob _(<InAttribute()> ByVal hPrinter As Int32, _<InAttribute()> ByVal dwJobId As Int32, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpJob As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef lpbSizeNeeded As Int32) As BooleanEnd Function#End Region#Region "FindFirstPrinterChangeNotification"#End Region#Region "FreePrinterNotifyInfo"<DllImport( "winspool.drv", EntryPoint:="FreePrinterNotifyInfo", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function FreePrinterNotifyInfo _(<InAttribute()> ByVal lppPrinterNotifyInfo As IntPtr) As BooleanEnd Function#End Region#Region "FindClosePrinterChangeNotification"<DllImport( "winspool.drv", EntryPoint:="FindClosePrinterChangeNotification", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function FindClosePrinterChangeNotification _(<InAttribute()> ByVal hChangeObject As IntPtr) As BooleanEnd Function#End Region#Region "EnumJobs"<DllImport( "winspool.drv", EntryPoint:="EnumJobs", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumJobs _(<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute()> ByVal FirstJob As Int32, _<InAttribute()> ByVal NumberOfJobs As Int32, _<InAttribute(), MarshalAs(UnmanagedType.U4)> ByVal Level As JobInfoLevels, _<OutAttribute()> ByVal pbOut As IntPtr, _<InAttribute()> ByVal cbIn As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcReturned As Int32 _) As BooleanEnd Function#End Region#Region "SetJob"<DllImport( "winspool.drv", EntryPoint:="SetJob", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function SetJob _(<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute()> ByVal dwJobId As Int32, _<InAttribute()> ByVal Level As Int32, _<InAttribute()> ByVal lpJob As IntPtr, _<InAttribute(), MarshalAs(UnmanagedType.U4)> ByVal dwCommand As PrintJobControlCommands _) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="SetJob", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function SetJob _( ByVal hPrinter As IntPtr, _ByVal dwJobId As Int32, _ByVal Level As Int32, _<MarshalAs(UnmanagedType.LPStruct)> ByVal lpJob As JOB_INFO_1, _ByVal dwCommand As PrintJobControlCommands _) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="SetJob", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function SetJob _( ByVal hPrinter As IntPtr, _ByVal dwJobId As Int32, _ByVal Level As Int32, _<MarshalAs(UnmanagedType.LPStruct)> ByVal lpJob As JOB_INFO_2, _ByVal dwCommand As PrintJobControlCommands _) As BooleanEnd Function#End Region#Region "EnumMonitors"<DllImport( "winspool.drv", EntryPoint:="EnumMonitors", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumMonitors(<InAttribute()> ByVal ServerName As String, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpBuf As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcReturned As Int32) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="EnumMonitors", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumMonitors(<InAttribute()> ByVal pServerName As IntPtr, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpBuf As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcReturned As Int32) As BooleanEnd Function#End Region#Region "DocumentProperties"<DllImport( "winspool.drv", EntryPoint:="DocumentProperties", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function DocumentProperties _(<InAttribute()> ByVal hwnd As IntPtr, _<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute()> ByVal pPrinterName As String, _<OutAttribute()> ByRef pDevModeOut As IntPtr, _<InAttribute()> ByVal pDevModeIn As IntPtr, _<InAttribute()> ByVal Mode As DocumentPropertiesModes) As Int32End Function#End Region#Region "DeviceCapabilities"<DllImport( "winspool.drv", EntryPoint:="DeviceCapabilities", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function DeviceCapabilities(<InAttribute()> ByVal pPrinterName As String, _<InAttribute()> ByVal pPortName As String, _<InAttribute(), MarshalAs(UnmanagedType.U4)> ByVal CapbilityIndex As PrintDeviceCapabilitiesIndexes, _<OutAttribute()> ByRef lpOut As IntPtr, _<InAttribute()> ByVal pDevMode As IntPtr) As Int32End Function#End Region#Region "GetPrinterDriverDirectory"<DllImport( "winspool.drv", EntryPoint:="GetPrinterDriverDirectory", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function GetPrinterDriverDirectory( _<InAttribute()> ByVal ServerName As String, _<InAttribute()> ByVal Environment As String, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByRef DriverDirectory As String, _<InAttribute()> ByVal BufferSize As Int32, _<OutAttribute()> ByRef BytesNeeded As Int32) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="GetPrinterDriverDirectory", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function GetPrinterDriverDirectory( _<InAttribute()> ByVal ServerName As IntPtr, _<InAttribute()> ByVal Environment As IntPtr, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByRef DriverDirectory As String, _<InAttribute()> ByVal BufferSize As Int32, _<OutAttribute()> ByRef BytesNeeded As Int32) As BooleanEnd Function#End Region#Region "AddPrinterDriver"<DllImport( "winspool.drv", EntryPoint:="AddPrinterDriver", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function AddPrinterDriver( _<InAttribute()> ByVal ServerName As String, _<InAttribute()> ByVal Level As Int32, _<InAttribute(), MarshalAs(UnmanagedType.LPStruct)> ByVal pDriverInfo As DRIVER_INFO_2) As BooleanEnd Function#End Region#Region "EnumPorts"<DllImport( "winspool.drv", EntryPoint:="EnumPorts", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumPorts( _<InAttribute()> ByVal ServerName As String, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal pbOut As IntPtr, _<InAttribute()> ByVal cbIn As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcReturned As Int32 _) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="EnumPorts", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumPorts( _<InAttribute()> ByVal ServerName As IntPtr, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal pbOut As IntPtr, _<InAttribute()> ByVal cbIn As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcReturned As Int32 _) As BooleanEnd Function#End Region#Region "SetPort"<DllImport( "winspool.drv", EntryPoint:="SetPort", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function SetPort( _<InAttribute()> ByVal ServerName As String, _<InAttribute()> ByVal PortName As String, _<InAttribute()> ByVal Level As Long, _<InAttribute(), MarshalAs(UnmanagedType.LPStruct)> ByVal PortInfo As PORT_INFO_3) As BooleanEnd Function#End Region#Region "EnumPrintProcessors"<DllImport( "winspool.drv", EntryPoint:="EnumPrintProcessors", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumPrintProcessors(<InAttribute()> ByVal ServerName As String, _<InAttribute()> ByVal Environment As String, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal lpBuf As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcbReturned As Int32) As BooleanEnd Function#End Region#Region "EnumPrintProcessorDataTypes"<DllImport( "winspool.drv", EntryPoint:="EnumPrintProcessorDatatypes", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumPrinterProcessorDataTypes(<InAttribute()> ByVal ServerName As String, _<InAttribute()> ByVal PrintProcessorName As String, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal pDataTypes As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcReturned As Int32) As BooleanEnd Function#End Region#Region "GetForm"<DllImport( "winspool.drv", EntryPoint:="GetForm", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function GetForm(<InAttribute()> ByVal PrinterHandle As IntPtr, _<InAttribute()> ByVal FormName As String, _<InAttribute()> ByVal Level As Integer, _<OutAttribute()> ByRef pForm As FORM_INFO_1, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32 _) As BooleanEnd Function#End Region#Region "SetForm"<DllImport( "winspool.drv", EntryPoint:="SetForm", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function SetForm(<InAttribute()> ByVal PrinterHandle As IntPtr, _<InAttribute()> ByVal FormName As String, _<InAttribute()> ByVal Level As Integer, _<InAttribute()> ByRef pForm As FORM_INFO_1 _) As BooleanEnd Function#End Region#Region "EnumForms"<DllImport( "winspool.drv", EntryPoint:="EnumForms", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EnumForms( _<InAttribute()> ByVal hPrinter As IntPtr, _<InAttribute()> ByVal Level As Int32, _<OutAttribute()> ByVal pForm As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32, _<OutAttribute()> ByRef pcFormsReturned As Int32) As BooleanEnd Function#End Region#Region "ReadPrinter"<DllImport( "winspool.drv", EntryPoint:="ReadPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function ReadPrinter(<InAttribute()> ByVal hPrinter As IntPtr, _<OutAttribute()> ByVal pBuffer As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="ReadPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function ReadPrinter(<InAttribute()> ByVal hPrinter As Int32, _<OutAttribute()> ByVal pBuffer As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32) As BooleanEnd Function#End Region#Region "WritePrinter"<DllImport( "winspool.drv", EntryPoint:="WritePrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function WritePrinter(<InAttribute()> ByVal hPrinter As IntPtr, _<OutAttribute()> ByVal pBuffer As IntPtr, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32) As BooleanEnd Function<DllImport( "winspool.drv", EntryPoint:="WritePrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function WritePrinter(<InAttribute()> ByVal hPrinter As IntPtr, _<OutAttribute()> ByVal data As String, _<InAttribute()> ByVal cbBuf As Int32, _<OutAttribute()> ByRef pcbNeeded As Int32) As BooleanEnd Function#End Region#Region "StartDocPrinter"<DllImport( "winspool.drv", EntryPoint:="StartDocPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function StartDocPrinter(<InAttribute()> ByVal hPrinter As Int32, _<InAttribute()> ByVal Level As Int32, _<InAttribute(), MarshalAs(UnmanagedType.LPStruct)> ByVal DocInfo As DOC_INFO) As BooleanEnd Function#End Region#Region "EndDocPrinter"<DllImport( "winspool.drv", EntryPoint:="EndDocPrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EndDocPrinter(<InAttribute()> ByVal hPrinter As Int32) As BooleanEnd Function#End Region#Region "StartPagePrinter"<DllImport( "winspool.drv", EntryPoint:="StartPagePrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function StartPagePrinter(<InAttribute()> ByVal hPrinter As Int32) As BooleanEnd Function#End Region#Region "EndPagePrinter"<DllImport( "winspool.drv", EntryPoint:="EndPagePrinter", _SetLastError:= True, CharSet:=CharSet.Ansi, _ExactSpelling:= False, _CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function EndPagePrinter(<InAttribute()> ByVal hPrinter As Int32) As BooleanEnd Function#End RegionEnd Class 'PrintAPI
|