Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer information.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00255865
Message ID:
00256119
Vues:
29
>Does anyone know the API call to get the printer type information? To see what I'm referring to by printer type, run the GETPRINTER() function in VFP. In my case,
>
>Name: \\PRINTSERV\System_support
>Status: Ready
>Type: HP LaserJet 5si
>
>What I am after is the type (HP LaserJet 5si). All of VFP functions return the name but not the type so I figured there is an API call to get this info. Could someone share a code example of how to get the printer type? I would greatly appreciate it!
>
>TIA,
>
>James
>
>PS - I know a function exists in the FOCUS.FLL library but I cannot use this library.

James,

Probably best would be a call to the API functiion GetPrinter(). However, this function requires that you pass a structure with pointers to several strings. You might first check out either: Vlad Tatavu's Pointers Class, Ed Rauh's CLSHEAP or Christof Lange's Structures (all available from the download section here at the UT). What you have to do is open the printer (via an API call), then call GetPrinter() with the appropriate structure and printer handle, translate the returned information, and close the printer. I can help with the structures and declarations, if need be.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform