Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with printsatus()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00268961
Message ID:
00269719
Vues:
17
>>I having problems with function printsatus()
>> where can I find some information about
>>an API that does it better ?
>
>Hi Moises,
>
>You mean the fact that it always returns .T.? AFAIK, there's no way around this. Using the API it's possible to open the printer, even when it's turned off.

You're pretty much right about this; as long as the spooler sits between the app and the printer, PRINTSTATUS() can only report a problem after it occurs. More detailed control can be obtained by setting up the print drive to prin directly to the printer rather than the spooler, but in VFP, this creates problems of its own, with VFP often reporting a problem connecting to the spooler.

Short of writing something that functions at the device driver layer in C/C++, VFP doesn't have any easy way to directly monitor the actual port status. it gets even more complex when network printing becomes involved, since multiple spooler layers may be active, and you might never be able to determine the real port being accessed, or have adequate privileges to see the hardware directly.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform