Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to assign printer rights or monitor printer usage
Message
From
16/11/2003 06:50:08
 
 
To
15/11/2003 20:12:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00849742
Message ID:
00850407
Views:
23
Hilmar,

Thanks just the same. FYI, I figured out how to use OpenPrinter, ClosePrinter, and EnumJobs API functions but cant get pass deciphering the contents of the pJob pointer parameter of EnumJobs bec of the DWORD, STRUCTs! Man, that's way over me...

BOOL EnumJobs(
HANDLE hPrinter, // handle to printer object
DWORD FirstJob, // location of first job in print queue to
// enumerate
DWORD NoJobs, // number of jobs to enumerate
DWORD Level, // structure level
LPBYTE pJob, // pointer to structure array
DWORD cbBuf, // size of array, in bytes
LPDWORD pcbNeeded, // addr. of variable with no. of bytes copied
// (or required)
LPDWORD pcReturned // addr. of variable with no. of job info.
// structures copied
);

pJob
Pointer to an array of either JOB_INFO_1 or JOB_INFO_2 structures.

typedef struct _JOB_INFO_1 { // ji1
DWORD JobId;
LPTSTR pPrinterName;
LPTSTR pMachineName;
LPTSTR pUserName;
LPTSTR pDocument;
LPTSTR pDatatype;
LPTSTR pStatus;
DWORD Status;
DWORD Priority;
DWORD Position;
DWORD TotalPages;
DWORD PagesPrinted;
SYSTEMTIME Submitted;
} JOB_INFO_1;

Dennis
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform