comp.lang.ada
 help / color / mirror / Atom feed
From: Adrien Plisson <aplisson-news@stochastique.net>
Subject: Re: Port LPT + ADA
Date: Sat, 04 Dec 2004 00:03:40 +0100
Date: 2004-12-04T00:03:40+01:00	[thread overview]
Message-ID: <41b0f053$0$30702$ba620e4c@news.skynet.be> (raw)
In-Reply-To: <u111r0db4fsoj9u3hlkachspjt0r2vvup7@4ax.com>

Dennis Lee Bieber wrote:
> 	As I recall, the ports are available under W9x, but not under
> the WinNT (includes XP) series.
> 
> 	Under WinNT, you pretty much need a system level driver designed
> to give such low-level access.

at a higher level you might try opening a file named "LPT1"...

using the CreateFile function passing "LPT1" as the file name, 
OPEN_EXISTING as dwCreationDisposition, and... well let's quote the MSDN:

Communications Resources
The CreateFile function can create a handle to a communications 
resource, such as the serial port COM1. For communications resources, 
the dwCreationDisposition parameter must be OPEN_EXISTING, and the 
hTemplate parameter must be NULL. Read, write, or read/write access can 
be specified, and the handle can be opened for overlapped I/O. For more 
information about communications, see Communications.

this is from the msdn library documentation for function CreateFile, 
available at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createfile.asp

the communications chapter is available at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/communications_resources.asp

now, RTHM (with H as Huge), try, and come back to ask any (eventually 
Ada related) question if needed...

-- 
rien




  parent reply	other threads:[~2004-12-03 23:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-03 13:56 Port LPT + ADA S�awo - MIR
2004-12-03 14:40 ` Martin Krischik
2004-12-03 15:29   ` Slawo - MIR
2004-12-03 18:46     ` Martin Krischik
2004-12-03 18:43 ` tmoran
     [not found] ` <u111r0db4fsoj9u3hlkachspjt0r2vvup7@4ax.com>
2004-12-03 23:03   ` Adrien Plisson [this message]
2004-12-03 23:51     ` Slawo - MIR
2004-12-04  0:51     ` Jeffrey Carter
2004-12-04 18:05 ` Port LPT + ADA (whta do I wrong?) S�awo - MIR
2004-12-04 20:20   ` Dmitry A. Kazakov
2004-12-07 18:13     ` Slawo - MIR
2004-12-07 20:55       ` Dmitry A. Kazakov
2004-12-08  4:28         ` Steve
2004-12-08  8:27           ` Dmitry A. Kazakov
2004-12-12 22:25           ` Brian May
2004-12-14  2:41             ` Steve
2004-12-12 22:46           ` Brian May
2004-12-12 23:03             ` Adrien Plisson
     [not found]       ` <rt8dr09tuvgbqaeq9vmujd1pqtb72hbamv@4ax.com>
2004-12-09  8:17         ` Jerry van Dijk
2004-12-05  6:45   ` Brian May
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox