Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Communicate with parallel port
Message
De
11/12/1998 07:15:34
 
 
À
11/12/1998 06:38:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00166401
Message ID:
00166467
Vues:
15
>Is there anything that will tell me what is actually done at the parallel port when I send out something like
>?? CHR(27)
>
>I'm thinking that I need some way of controlling the port directly for both send and receive of data bits.

You can probably do this using the low-level I/O API; I haven't been terribly successful using the native VFP LLF implementations, but using the Win32 API calls or the corresponding C implementations should work well, or look at _inp and _out in the MSDN for more details on direct addressing of I/O ports. This is compatible with Win95, but not NT. It relies on polled I/O, so it eats the processor for lunch.

>
>Thanks
>
>>>Try:
>>>
>>>SET PRINTER TO LPTx
>>>SET DEVICE TO PRINTER
>>>
>>>And use @...SAY commands to send data to printer.
>>>
>>Hi Vlad,
>>
>>Actually, I believe you will have to use the ?? operator to send escape codes to a printer, i.e.
>>
>>SET PRINTER ON
>>SET PRINTER TO LPTx
>>?? CHR(27) + CHR(XX) + CHR(YY)
>>
>>Used to work in DOS, anyway.
>>
>>regards,
>>
>>jim
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
Répondre
Fil
Voir

Click here to load this message in the networking platform