From: Leon AT caresystems DOT com DOT au To: djgpp AT delorie DOT com Date: Tue, 18 Jul 2000 14:52:55 +1000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Programming IO Ports in djgpp Message-ID: <39746F47.1851.1319CBC@localhost> In-reply-to: <8kvm0n$crk$1@duke.telepac.pt> X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.