 |
SetJob ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The SetJob function pauses, resumes, cancels, or restarts a print job on a specified printer. You can also use the SetJob function to set print job parameters, such as the print job priority and the document name. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL SetJob(
HANDLE hPrinter, // handle to printer object
DWORD JobId, // print job identifier
DWORD Level, // information level
LPBYTE pJob, // job information buffer
DWORD Command // job command value
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER SetJob IN winspool.drv;
INTEGER hPrinter,;
INTEGER JobId,;
INTEGER lvl,;
INTEGER pJob,;
INTEGER cmd
|
 |
 |
 |
| Parameters: |
 |
hPrinter
[in] Handle to the printer object of interest. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
JobId
[in] Identifier that specifies the print job.
Level
[in] Specifies the type of job information structure pointed to by the pJob parameter: 0, 1, 2
pJob
[in] Pointer to a JOB_INFO_1 or JOB_INFO_2 or JOB_INFO_3 structure.
Command
[in] Specifies the print job operation to perform. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is a nonzero value. |
 |
 |
| My comment: |
 |
You must have PRINTER_ACCESS_ADMINISTER access permission for a printer in order to change a print job"s position in the print queue.
To remove or delete all of the print jobs for a particular printer, call the SetPrinter function with its Command parameter set to PRINTER_CONTROL_PURGE. |
 |
 |
| Word Index links for the SetJob : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2003-01-20 17:10:30 | | Modified: | 2003-01-20 17:14:24 | Visited in last 7 days: 26 |