Using Win32 functions in Visual FoxPro Image Gallery
Printing and Print Spooler
..msdn
AddPort
AddPrinter
ClosePrinter
ConfigurePort
ConnectToPrinterDlg
DeletePort
DeviceCapabilities
DocumentProperties
EndDoc
EndPage
EnumForms
EnumJobs
EnumPorts
EnumPrinterData
EnumPrinterDrivers
EnumPrinters
EnumPrintProcessorDatatypes
EnumPrintProcessors
Escape
FindClosePrinterChangeNotification
FindFirstPrinterChangeNotification
FindNextPrinterChangeNotification
FreePrinterNotifyInfo
GetDefaultPrinter
GetPrinter
GetPrinterData
GetPrinterDriverDirectory
GetPrintProcessorDirectory
OpenPrinter
PrinterProperties
SetDefaultPrinter
SetJob
SetPrinter
StartDoc
StartPage
Code examples:
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
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:
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-01-20 17:10:30
Modified: 2003-01-20 17:14:24
Visited in last 7 days: 23
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.163.61.66)
15 sec.Function: 'CLSIDFromString'
30 sec.Function: 'CeGetStoreInformation'
43 sec.Example: 'GDI+: reading and writing metadata in JPEG and TIFF files'
59 sec.Function: 'GetAclInformation'
1.22 min.Function: 'MAPIReadMail'
1.45 min.Function: 'GetCurrentHwProfile'
1.65 min.Function: 'mixerGetLineInfo'
1.9 min.Function: 'EnumPrinterDrivers'
2.13 min.Function: 'CreateProcessWithLogonW'
2.38 min.Function: 'JetInit'
Google
Advertise here!