Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than winspool, prefix the name with the module name and a period.
SetJob (winspool)
.
C# Signature:
[DllImport("winspool.drv", EntryPoint="SetJobA")]
[DllImport("winspool.drv", EntryPoint="SetJob")]
static extern int SetJobA(IntPtr hPrinter, int JobId,
int Level, ref byte pJob, int Command_Renamed);
VB Signature:
Declare Function SetJob Lib "winspool.drv" Alias "SetJobA" (hPrinter As IntPtr, JobId As Integer,
Declare Function SetJob Lib "winspool.drv" (hPrinter As IntPtr, JobId As Integer,
Level As Integer, ByRef pJob As Byte, Command_Renamed As Integer)
User-Defined Types:
Used by sample code: PRINTER_DEFAULTS
Public Const JOB_CONTROL_PAUSE = &H1
Public Const JOB_CONTROL_RESUME = &H2
Public Const JOB_CONTROL_RESTART = &H4
Public Const JOB_CONTROL_CANCEL = &H3
Public Const JOB_CONTROL_DELETE = &H5
Public Const JOB_CONTROL_RETAIN = &H8
Public Const JOB_CONTROL_RELEASE = &H9
Notes:
None.
Tips & Tricks:
How to cancel a print job:
C#
int pHandle = 0;
PRINTER_DEFAULTS defaults = new PRINTER_DEFAULTS();
dim Result as long = SetJob(handle, jobid, 0, Nothing, JOB_CONTROL_RESUME)
Alternative Managed API:
The System.Management API allows for lots of printer stuff, but doesn't let you delete a print job in Win2K.
TODO - a short description
10/19/2009 7:36:00 AM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).