GetJob


BOOL GetJob(
  HANDLE  hPrinter,   /* handle of printer                    */
  DWORD   dwJobId,    /* job identifier value                 */
  DWORD   dwLevel,    /* data-structure level                 */
  LPBYTE  lpbJob,     /* address of data-structure array     */
  DWORD   cbBuf       /* count of bytes in array              */
  LPDWORD lpdwNeeded  /* address of value that contains count */
                      /* of bytes retrieved (or required)     */
);

Retrieves data about a print job for the specified printer.

hPrinter

Identifies the printer for which the print job data is retrieved.

dwJobId

Identifies the print job for which data should be retrieved.

dwLevel

Specifies the version of the structure to which lpbJob points. This value must be either 1 or 2.

lpbJob

Points to an array that contains either a JOB_INFO_1 or a JOB_INFO_2 structure. If dwLevel is 1, this function stores the data in a JOB_INFO_1 structure; if dwLevel is 2, this function stores the data in a JOB_INFO_2 structure.

cbBuf

Specifies the size, in bytes, of the array.

lpdwNeeded

Points to a value that specifies the number of bytes copied if the function succeeds or the number of bytes required if cbBuf is too small.