Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to assign printer rights or monitor printer usage
Message
De
16/11/2003 06:50:08
 
 
À
15/11/2003 20:12:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00849742
Message ID:
00850407
Vues:
22
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform