Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print Spooler
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00103405
Message ID:
00103846
Vues:
21
Thanks again, George. I'm going to be trying this tonight...

Barbara

>>>Since I haven't had a chance to test this, please let me know how it works.
>>
>>Thanks, George, I'll let you know!
>>
>>Barbara
>I hope my typos didn't give you too big a headache. Here's a corrected version.
>DECLARE OpenPrinter IN Winspool.drv;
>   STRING pPrinterName, INTEGER @lphandle,;
>   STRING @lpDefault
>DECLARE EnumJobs IN Winspool.drv;
>  INTEGER hPrinter, INTEGER FirstJob,;
>  INTEGER NoJobs, INTEGER level,;
>  STRING @pinfo, INTEGER lSize,;
>  INTEGER @pcbNeeded, INTEGER @pcReturned
>DECLARE ClosePrinter IN Winspool.drv;
>  INTEGER hPrinter
>* lcprinter is the same value as the first column
>* from APRINTERS()
>lnhandle = 0
>llresult = OpenPrinter(lcprinter, @lnhandle, 0)
>IF llresult
>  * Replace the 999999 with the maximum number of values
>  lcstruct = SPACE(8 * 999999)
>  lnsize = LEN(lcstruct)
>  STORE 0 TO lnNeeded, lnReturned
>  * The 999999 should contain the number of values also
>  llresult = EnumJobs(lnhandle, 0, 999999, 1, @lcstruct,;
>   lnsize, @lnneeded , @lnreturned)
>  IF llresult
>    * lnreturned has the number of jobs
>  ENDIF
>  = ClosePrinter(lnhandle)
>ENDIF
>If the value is too big, things will take long enough so all the jobs are run *g* Sorry about the typos.
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform