using System.Runtime.InteropServices; // for CharSet
// For Unicode
[DllImport("winspool.drv", EntryPoint="StartDocPrinterW", SetLastError=true,
CharSet=CharSet.Unicode,
ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
private static extern uint StartDocPrinter(
IntPtr hPrinter,
Int32 level,
[In] ref DOC_INFO_1W di);
// For ANSI
[DllImport("winspool.drv", EntryPoint="StartDocPrinterA", SetLastError=true,
CharSet=CharSet.Ansi,
ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
private static extern uint StartDocPrinter(
IntPtr hPrinter,
Int32 level,
[In] ref DOC_INFO_1A di);
Structure StartDocPrinter
Public TODO
End Structure
'For Unicode
<DllImport("winspool.drv", CharSet:=CharSet.Unicode, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
Public Function StartDocPrinter(hPrinter As IntPtr, Level As Integer, ByRef pDocInfo As DOC_INFO_1W) As Long
End Function
'For ANSI
<DllImport("winspool.drv", CharSet:=CharSet.Ansi, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
Public Function StartDocPrinter(hPrinter As IntPtr, Level As Integer, ByRef pDocInfo As DOC_INFO_1A) As Long
End Function
None.
See DOC_INFO_1A Ansi or DOC_INFO_1W Unicode .