🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11613

Re: Writing to the LPT1 control register.

#11613
From: Rob
Date: Sat, 31 Jan 2004 23:08
31 lines
1901 bytes
"Bogdan" <boprea@xnet.ro> wrote in message
news:401be502@newsgroups.borland.com...
>   Does anybody know how to write data to the control register of
> the parallel port  in Windows XP.Using inline assembly can be
> easy( out 379,1 byte of data  ), but Windows XP does not allow
> direct hardware access and if  I use CreateFile("LPT1",.........) and
> then WriteFile(..........)  I cannot write separately to each of the
> 3 registers of the parallel port.

Windows NT and XP prevent direct reading or writing of the
parallel port registers.   You actually need to obtain (and install) a
device driver to achieve this.   Using WriteFile, it is only
possible to write to the data register.

You might try looking at

http://www.lvr.com/parport.htm

You will need to get your hands on a driver that is referred to
in that link as a "inpout DLL".  Such a beast is available
(with source and examples) through

http://www.logix4u.cjb.net/



>  An exact example(in C++) would be very helpful.
>
> Bogdan.
>
>
Technical Details
Message-ID: <401c37bf@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <401be502@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,b905783ba4fb1746
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-31 15:39:38 PST
From: "Rob" <nospam@nonexistant.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <401be502@newsgroups.borland.com>
Subject: Re: Writing to the LPT1 control register.
Date: Sun, 1 Feb 2004 09:38:36 +1030
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
NNTP-Posting-Host: 211.26.115.141
Message-ID: <401c37bf@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1075591103 211.26.115.141 (31 Jan 2004 15:18:23 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail