>>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.