From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d0077c2a3f44fc09 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!204.71.34.3!newsfeed.cwix.com!ossa.telenet-ops.be!skynet.be!newspost001!tjb!not-for-mail Date: Sat, 04 Dec 2004 00:03:40 +0100 From: Adrien Plisson Reply-To: aplisson-news@stochastique.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: fr-be, fr, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Port LPT + ADA References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <41b0f053$0$30702$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 45bd2c77.news.skynet.be X-Trace: 1102114899 news.skynet.be 30702 217.136.134.43:17752 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news1.google.com comp.lang.ada:6745 Date: 2004-12-04T00:03:40+01:00 List-Id: 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