BOOL GetJob(hPrinter, JobId, Level, pJob, cbBuf, pcbNeeded) | |||
HANDLE hPrinter; | |||
DWORD JobId; | |||
DWORD Level; | |||
LPBYTE pJob; | |||
DWORD cbBuf; | |||
LPDWORD pcbNeeded; |
The GetJob function retrieves information about a print job on a specified printer.
hPrinter
Indicates the open Printer handle that this function is to be performed upon. This Handle is obtained with the OpenPrinter function.
JobId
A job identifier that specifies the print job of interest.
Level
This value can be either 1, or 2.
pJob
This points to either a JOB_INFO_1, or JOB_INFO_2 structure.
cbBuf
The size in bytes of the buffer pointed to by pJob.
pcbNeeded
This points to a variable that will be updated to contain the actual buffer size required that is pointed to by pJob. If cbBuf is too small then GetLastError will indicate ERROR_BUFFER_TOO_SMALL, and pcbNeeded will contain the size required. If cbBuf is large enough, then pcbNeeded will contain the number of bytes that were copied.
The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.