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 10:56:25
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
16/11/2003 06:50:08
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00849742
Message ID:
00850432
Views:
24
>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...

Those are data types of the C or C++ programming languages. There have been discussions here, on how to convert them to and from VFP.

The first word, BOOL, is the return value of the function. The others are the parameters which the function accepts.

See, for instance, message #842632, or perhaps the entire thread.

>
>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
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform