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:
Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
EnumJobs
..msdn    Add comment     W32 Constants      Translate this page
The EnumJobs function retrieves information about a specified set of print jobs for a specified printer.
Code examples:
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)
Declaration:
BOOL EnumJobs(
  HANDLE hPrinter,    // handle to printer object
  DWORD FirstJob,     // index of first job
  DWORD NoJobs,       // number of jobs to enumerate
  DWORD Level,        // information level
  LPBYTE pJob,        // job information buffer
  DWORD cbBuf,        // size of job information buffer
  LPDWORD pcbNeeded,  // bytes received or required
  LPDWORD pcReturned  // number of jobs received
);
FoxPro declaration:
DECLARE INTEGER EnumJobs IN winspool.drv;
    INTEGER   hPrinter,;
    INTEGER   FirstJob,;
    INTEGER   NoJobs,;
    INTEGER   Lvl,;
    INTEGER   pJob,;
    INTEGER   cbBuf,;
    INTEGER @ pcbNeeded,;
    INTEGER @ pcReturned

Parameters:
hPrinter
[in] Handle to the printer object whose print jobs the function enumerates. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.

FirstJob
[in] Specifies the zero-based position within the print queue of the first print job to enumerate.

NoJobs
[in] Specifies the total number of print jobs to enumerate.

Level
[in] Specifies the type of information returned in the pJob buffer.

pJob
[out] Pointer to a buffer that receives an array of JOB_INFO_1, JOB_INFO_2, or JOB_INFO_3 structures, depending on Level value.

cbBuf
[in] Specifies the size, in bytes, of the pJob buffer.

pcbNeeded
[out] Pointer to a variable that receives the number of bytes copied if the function succeeds.

pcReturned
[out] Pointer to a variable that receives the number of JOB_INFO_1, JOB_INFO_2, or JOB_INFO_3 structures returned in the pJob buffer.
Return value:
If the function succeeds, the return value is a nonzero value.
My comment:
The JOB_INFO_1 structure contains general print-job information; the JOB_INFO_2 structure has much more detailed information. The JOB_INFO_3 structure contains information about how jobs are linked.

To determine the number of print jobs in the printer queue, call the GetPrinter function with the Level parameter set to 2.
Word Index links for the EnumJobs :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-01-16 13:51:18
Modified: 2003-01-16 13:54:33
Visited in last 7 days: 29
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 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.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.20.33.176)
1 sec.Function: 'LockWorkStation'
2 sec.Function: 'IsValidSid'
3 sec.Function: 'timeGetDevCaps'
Function group: 'Windows Multimedia'
5 sec.Function: 'GetIconInfo'
8 sec.Example: 'How to retrieve number of objects in the Recycle Bin'
12 sec.Example: 'Basic Volume information'
2 day(s)Solution: 'LanguageBar ActiveX Control'
4 day(s)Function: 'SHRegOpenUSKey'
Function group: 'Registry'
Google
Advertise here!