Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6: Checking for LPT port status
Message
 
To
04/01/2001 14:26:07
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00458542
Message ID:
00459794
Views:
18
Thanks! I will give it a try.

>David,
>
>You might try to open the port with the printer on-line and see if you can read from the port or write to it.
>
>lnHandle = FOPEN('LPT1')
>IF lnHandle > 0 AND FERROR() = 0
>
>
> FRWRITE(lnhandle, CHR(27) + )
> lnError = FERROR()
>
> *-- might put code here to read a response using FREAD()
>
> IF lnError = 0
>
> FCLOSE(lnhandle)
>
>
> ELSE
>
> FCLOSE(lnhandle)
>
>
> ENDIF && lnError = 0
>
>
>ELSE
>
>
>
>ENDIF && lnHandle > 0 AND FERROR() = 0
>
>Keep in mind that low level file functions operate outside the realm of the error handler. You'll need to monitor each open, read, and write with FERROR() and respond accordingly.
>
>
>Jim
DLC
"Use the Right Tool for the Job!"
davidandcynthia@email.com
Previous
Reply
Map
View

Click here to load this message in the networking platform