@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: TODO - a short description !!!!C# Signature: [DllImport("winspool.dll", SetLastError=true)] static extern TODO StartDocPrinter(TODO); !!!!VB Signature: Declare Function StartDocPrinter Lib "winspool.dll" (TODO) As TODO <DllImport("winspool.drv", EntryPoint:="StartDocPrinterA", ExactSpelling:=True, SetLastError:=True, CallingConvention:=CallingConvention.StdCall, CharSet:=CharSet.Ansi)> _ Private Shared Function StartDocPrinter(ByVal hPrinter As IntPtr, ByVal level As Integer, ByRef pDocInfo As DOC_INFO_1) As Integer End Function This implementation of StartDocPrinter must be used with the ANSI version of [DOC_INFO_1]. !!!!User-Defined Types: [DOC_INFO_1] !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: StartDocPrinter returns a PrintJobIdentifier (integer value) and must not be declared Boolean! According to MSDN the second parameter "level" must always be 1 !!!!Tips & Tricks: Please add some! !!!!Sample Code: Public Function StartDoc(hPrinter as IntPtr, ByVal documentTitle As String) As Boolean Dim di As New DOC_INFO_1 With di .pDocName = documentTitle .pOutputFile = vbNullString .pDatatype = vbNullString End With Dim printJobID as Integer = StartDocPrinter(hPrinter, 1, di) Return (printJobID <> 0) End Function Documentation: StartDocPrinter@msdn on MSDN
Edit winspool.StartDoc...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.