Article View: borland.public.cppbuilder.nativeapi
Article #13932Re: Communication via LPT port
From: Pete Fraser
Date: Tue, 09 Sep 2003 08:23
Date: Tue, 09 Sep 2003 08:23
18 lines
1891 bytes
1891 bytes
Writing to an LPT port using WriteFile *assumes* that you have set the handshake properly. If you don't then it will 'hang'. The parallel port has ready/busy pins that need setting to a special state to allow them to work (I think it's 5v). Note also that writing to the parallel port like this only sets the data for a short time while the strobe changes state - then it goes back to 0v on all 8 bits :( If you want the data to latch you need to write a special driver :( HTH Pete "ScOe" <sven.savic@zg.hinet.hr> wrote in message news:3f5cf06b@newsgroups.borland.com... How do i send something to LPT1 port on WinNT. I know how to send it with direct hardware access but that works only on Win9x. I've tried with CreateFile and WriteFile (just like with COM port) but things get jammed on WriteFile and that function doesnt return, so i need to kill the process.
Technical Details
Message-ID:
<3f5d8f41@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f5cf06b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d0bebb98df6a923e X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-09 01:32:41 PST From: "Pete Fraser" <pete.fraser@at.frasersoft.dot.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f5cf06b@newsgroups.borland.com> Subject: Re: Communication via LPT port Date: Tue, 9 Sep 2003 09:23:44 +0100 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 195.12.18.1 Message-ID: <3f5d8f41@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1063096129 195.12.18.1 (9 Sep 2003 01:28:49 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail