RE: [Dev-C++] _outp & _inp under windows 2000
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Mark S. <mar...@li...> - 2003-01-23 11:04:41
|
In Original Message From: Santiago Palmier Campos Santy wrote:............. What kind of I/O port does Mark Smith really need to access? And how? Well I'm using 2 cards (PC27E & PC214E) one a A2D & the other a DIO ( = from Amplicon UK) on the ISA bus to control some lab equiptment and take measurements. I have written the control software myself using _inp & _outp and can = set the cards address by means of DIP switches on the cards. The console application works fine but I am looking to future proof the software so = it could run also on a more recent windows platforms, it also means that = I'm forced to maintain it on a win98 machine. I followed up Jaap de Wolff suggestion ( http://www.beyondlogic.org/porttalk/porttalk.htm ) and took a look at porttalk, though I have not tried it yet, it looks exactly like what = I'm after and also gives me a way of modifying my source code to achieve = the same functionality. (I'm an old fashioned DOS based programmer & no = nothing about windows API :=AD~( ) The article states:------------- Talking to the Device Driver - User Mode APIs PortTalk also has IOCTLs to allow reading and writing to I/O Ports. In = this case, your usermode program would open the PortTalk device driver and = pass data to the driver through IOCTL calls. The driver then talks to the = I/O port(s) in ring 0.=20 The Porttalk driver contains two IOCTL calls to read from and write to = I/O Ports. A c source file, pt_iotcl.c can be used to provide easy support = based on the popular inportb/outportb and inp/outp calls supported in earlier programming environments. By simply including pt_ioctl.c and calling OpenPortTalk when you program starts and ClosePortTalk when your = program finishes you can have the functionality of the inportb/outportb and = inp/outp calls -------------------- Regards Mark=20 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.406 / Virus Database: 229 - Release Date: 21/10/02 =20 The information contained in this e-mail message (and any attachment transmitted herewith) is privileged and confidential and is intended = for the exclusive use of the addressee(s). If you are not an addressee, any disclosure, reproduction, distribution or other dissemination or use of = this communication is strictly prohibited. If you have received this communication in error, please contact us immediately so that we can = correct the error. |