Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer information.
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00255865
Message ID:
00256119
Views:
31
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform