Article View: borland.public.cppbuilder.nativeapi
Article #14357Re: Interrupt handling on winNT, 2000, XP
From: Jonathan Arnold
Date: Mon, 18 Aug 2003 11:13
Date: Mon, 18 Aug 2003 11:13
68 lines
2898 bytes
2898 bytes
wpa wrote:
> Is there anyone who has an example of how write code for an interrupt in
> Builder and Win2000, NT or XP?
> I want to have some code to run when there is a printer port interrupt.
You can't use inport / outport any more. Win32 is more "protected"
than that, so it isn't allowed.
However, you do have a few different options, as have been posted here
before:
Discussion of Port I/O under NT:
http://users.skynet.be/k-net/ParPort/index.html
http://www.bcbdev.com/faqs/faq30.htm
http://home.pacifier.com/~jgibbon/program_tip_1.htm
> Harold Howe has contributed something that you might be able to use
> under win95 only:
> http://www.bcbdev.com/components.htm
Or EnTech's Port I/O component:
http://www.entechtaiwan.com/tools.htm
Or:
Visit http://www.internals.com
That's WinIo v1.3 - Direct Hardware Access Under Windows 9x/ME/NT/2000
Or:
http://www.cybermagic.co.nz/winsoft/index.htm : CyberMagic's IOPort
component
Or:
http://www.beyondlogic.com : PortTalk, Port Device Driver
Or more on Torry's:
http://www.torry.net/portaccess.htm
Or, for Win9x only, if you have TASM, you can use the following:
#define outportb(port,val) outb(val,port)
void __fastcall outb(Byte val, WORD port)
{
asm out dx,al
}
#define inportb(port) inb(0,port)
Byte __fastcall inb(Byte dummy, WORD port)
{
asm in al,dx
}
There's also a great site on programming the parallel port:
http://www.lvr.com/parport.htm
--
Jonathan Arnold C/C++/CBuilder Keen Advice:
http://www.keen.com/categories/categorylist_expand.asp?sid=5156620
Comprehensive C++Builder link site:
http://www.buddydog.org/C++Builder/c++builder.html
Technical Details
Message-ID:
<3f40b4bf$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!62.132.236.44.MISMATCH!ecngs!feeder.ecngs.de!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f3de15c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,59e5156bea560038 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-18 04:41:33 PST Date: Mon, 18 Aug 2003 07:13:03 -0400 From: Jonathan Arnold <jdarnold@buddydog.org> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Interrupt handling on winNT, 2000, XP References: <3f3de15c$1@newsgroups.borland.com> In-Reply-To: <3f3de15c$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 66.92.76.225 Message-ID: <3f40b4bf$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061205183 66.92.76.225 (18 Aug 2003 04:13:03 -0700) Lines: 69 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!62.132.236.44.MISMATCH!ecngs!feeder.ecngs.de!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail