Mail Archives: djgpp/2000/07/18/00:45:16
On 17 Jul 2000, at 20:11, Paulo J. Matos aka PDestroy wrote:
> Hi,
> I use djgpp to compile my C programs under windows
> since I'm used to gcc. I need help on programming
> I/O Ports under Windows
under windows?
well my very limited understanding is as such
if you wanna write to port (eg lpt1)
just use call to ::CreateFile - the name of this
call might be not very easy to predict but in
description it does actually say that this call
can be used not only to create files - but
handles to communications ports, pipes etc.
anyway in one of the params you can simply
type "LPT1" or whatever the name of port is.
in order to actually send data to that port use
::WriteFile call.
Some things to be understood - it works fine for
SENDING data to ports, the READING data
from some device conncected to a given port
could be more complicated (probably you are
getting into the driver realm here).
Also if you want to send data to say LPT1 port
BUT on a different machine (say from win95
workstation to winNt server) - it could be
simpler to consider using other methodologies.
- Raw text -