Thread: RE: [Dev-C++] _outp & _inp under windows 2000
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Santiago P. C. <San...@yd...> - 2003-01-22 18:22:51
|
Hi *, You can consider porting your app to wxWindows, it is not only a GUI library, it is a complete portable framework. You can use the latest wxWindows stable release (2.4.0) and wxCTB communications package by Joachim Buermann (http://www.iftools.com/), it = is not GUI based so it can be used in console apps. It's an "easy" way to have a portable app that accesses I/O ports... Regards,=20 Santy -----Original Message----- From: Flameeyes [mailto:dap...@li...]=20 Sent: mi=E9rcoles, 22 de enero de 2003 19:09 To: dev...@li... Subject: Re: [Dev-C++] _outp & _inp under windows 2000 Mark Smith wrote: > I have some data acquisition software which runs OK on win98 but=20 > because you cannot address the hardware directly with win 2000 it wont = > work, It is a console based application, is there an easy way for me=20 > to modify the code so it will run under win 2000? I think that you can't. Only SYSTEM level software can access directly the I/O ports, all other=20 software can only open it as a file [and is not a great method, i tried=20 it for one program]. --=20 Flameeyes ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford= =20IT training? All 2003 ictp students receive scholarships. Get hands-on train= ing in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -------------------------------------------------------------------------= ------------- This message and any files transmitted with it are confidential and inten= ded solely=20 for the use of the individual or entity to whom they are addressed. No co= nfidentiality=20 or privilege is waived or lost by any wrong transmission.=20 If you have received this message in error, please immediately destroy it= =20and kindly=20 notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, o= r copy any=20 part of this message if you are not the intended recipient. Opinions, con= clusions and=20 other information in this message that do not relate to the official busi= ness of=20 Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given= =20nor endorsed by it.=20 -------------------------------------------------------------------------= ------------- |
|
From: Jaap de W. <wo...@Ne...> - 2003-01-23 08:06:27
|
There are several device drivers available for WINNT, which allow you to access IO ports. One is described in a Dr Dobbs Journal of May 1996, which I unfortunatly don't have anymore,. see http://www.beyondlogic.org/porttalk/porttalk.htm but there are more.. > -----Original Message----- > From: Mark Smith [mailto:mar...@li...] > Sent: Wednesday, January 22, 2003 06:04 PM > To: 'dev...@li...' > Subject: [Dev-C++] _outp & _inp under windows 2000 > > > I have some data acquisition software which runs OK on win98 > but because you > cannot address the hardware directly with win 2000 it wont > work, It is a > console based application, is there an easy way for me to > modify the code > so it will run under win 2000? > An example would be most helpful. I'm a console only app man > at this moment. > TIA > Mark > > --- > 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 > > > > 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. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! > Can't afford IT training? All 2003 ictp students receive scholarships. > Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Santiago P. C. <San...@yd...> - 2003-01-23 09:55:02
|
Hi Per, Mark and *, I know that there is no portable way for __low-level__ access to I/O port= s due to OSes differences, but I thought we were talking about some kind of= __high-level__ I/O port access... BTW, it seems to me that we were talking about accesing 'common' I/O port= s: COM, LPT... from a console program, not creating a low level access drive= r for any OS nor accessing special/rare/propietary data acquisition HW, weren't we? So that's why the wxCTB exists, it is not a device driver but an attempt = to create a portable __high-level__ (like the rest of wxWindows itself and i= ts contribs) communications package.=20 We must say that, like all free/open source/etc projects, it is still bei= ng actively developed, so while being completely functional for a lot of situations, it is not complete by now... Anyway, this library (provided as a contrib package for wxWindows) uses internally separate low-level access code for Windows & Linux (the only 2= platfforms currently supported), but provides an external 'common' unique= interface for high-level access, that's why I think it would be a good solution ;o) OTOH, it seems to me that the app is accessing (from a high-level approac= h) a 'common' I/O port (probably a serial one) because Mark Smith has the source code of the 'data acquisition SW', don't you think so? It would be= very strange to have the source code of an app that accesses some propiet= ary interfaces or special device drivers... So the real question is: What kind of I/O port does Mark Smith really nee= d to access? And how? ;o? Best regards, ~Santy -----Original Message----- From: Per Westermark [mailto:pw...@ia...]=20 Sent: mi=E9rcoles, 22 de enero de 2003 22:53 To: Santiago Palmier Campos Cc: 'Flameeyes'; dev...@li... Subject: RE: [Dev-C++] _outp & _inp under windows 2000 Sorry, but normally you can't have a portable way of accessing I/O ports,= since I/O ports are handled by the OS drivers. For some special ports, such as COM, LPT, the OS have reasonable high-lev= el access methods that wxWindows etc may use to support portable application= s. For the majority of ports - such as data acquisition boards, sound cards etc, you normally have to write dedicated low-level drivers for the acces= s. There are a couple of companies that sells multi-platform driver SDK tool= s, where they supply a low-level assembler part for different OS, and you wr= ite a higher-level C/C++ "busines-logic" for the hardware. Thereby, you don't= have to know everything about the different operating systems. Old data acquisition software written for MsDos, Win 3.1, Win95, Win98 et= c are designed for a situation where there either doesn't exist a memory management unit or no privileged CPU instructions, or where the operating= system gives carte blanche and allows a relatively free read/write in the= =20IO and expansion board memory address spaces. This means that the doesn't ma= ke use of device drivers, but instead perform port IO or memory operations directly to the hardware. To get such a software to work on a new OS, without rewriting the softwar= e, would require the OS exception handler to catch illegal memory and IO accesses and depending on source and/or target perform the same operation= instead, and then return the result to the application as if the applicat= ion had done it itself. Such emulation creates a HUGE overhead meaning that i= t's only meaningful to even think about it for low-speed devices. /Per W On Wed, 22 Jan 2003, Santiago Palmier Campos wrote: > Hi *, > > You can consider porting your app to wxWindows, it is not only a GUI=20 > library, it is a complete portable framework. You can use the latest=20 > wxWindows stable release (2.4.0) and wxCTB communications package by=20 > Joachim Buermann (http://www.iftools.com/), it is not GUI based so it=20 > can be used in console apps. > > It's an "easy" way to have a portable app that accesses I/O ports... > > Regards, > Santy > > -----Original Message----- > From: Flameeyes [mailto:dap...@li...] > Sent: mi=E9rcoles, 22 de enero de 2003 19:09 > To: dev...@li... > Subject: Re: [Dev-C++] _outp & _inp under windows 2000 > > > Mark Smith wrote: > > I have some data acquisition software which runs OK on win98 but=20 > > because you cannot address the hardware directly with win 2000 it=20 > > wont work, It is a console based application, is there an easy way=20 > > for me to modify the code so it will run under win 2000? > I think that you can't. > Only SYSTEM level software can access directly the I/O ports, all=20 > other software can only open it as a file [and is not a great method,=20 > i tried it for one program]. > > -- > Flameeyes > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! Can't=20 > afford IT training? All 2003 ictp students receive scholarships. Get=20 > hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.=20 > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Dev-cpp-users mailing list Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > -------------------------------------------------------------------------= --- ---------- > This message and any files transmitted with it are confidential and intended solely > for the use of the individual or entity to whom they are addressed. No confidentiality > or privilege is waived or lost by any wrong transmission. > If you have received this message in error, please immediately destroy = it and kindly > notify the sender by reply email. > You must not, directly or indirectly, use, disclose, distribute, print,= =20or copy any > part of this message if you are not the intended recipient. Opinions, conclusions and > other information in this message that do not relate to the official business of > Ydilo Advanced Voice Solutions, S.A. shall be understood as neither giv= en nor endorsed by it. > -------------------------------------------------------------------------= --- ---------- > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! Can't=20 > afford IT training? All 2003 ictp students receive scholarships. Get=20 > hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.=20 > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Dev-cpp-users mailing list Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > -------------------------------------------------------------------------= ------------- This message and any files transmitted with it are confidential and inten= ded solely=20 for the use of the individual or entity to whom they are addressed. No co= nfidentiality=20 or privilege is waived or lost by any wrong transmission.=20 If you have received this message in error, please immediately destroy it= =20and kindly=20 notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, o= r copy any=20 part of this message if you are not the intended recipient. Opinions, con= clusions and=20 other information in this message that do not relate to the official busi= ness of=20 Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given= =20nor endorsed by it.=20 -------------------------------------------------------------------------= ------------- |
|
From: veenurs <ve...@ma...> - 2003-01-25 09:48:09
|
Hi All, Well , a few days back I asked here about creating a splash screen for windows apps . Could never get started witth WxWiondows stuff , though :-( However , I was able to make one with the basic Microsoft C API . If anybody is interested , it's here : <a href="http://www.geocities.com/onesplash2003/">http://www.geocities.com/onesplash2003 </a> It's deisgned to launch JAVAW on win , but of course can launch anything else , too .As there is no way to know when the java app is completely loaded , it shows up for a preconfigured period of time . The only way I could think of tracking whether the java app has loaded was to have a client-server arch. - that would've been a long shot, though ! Any suggestions ? Can anyone help me with tracking the mouse-clicks in the client area of the splash screen ? -Rahul . |
|
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. |
|
From: Per W. <pw...@ia...> - 2003-01-23 20:37:10
|
Give a howl if you need some information from DrDobbs May -96. I't seems to the only one from that year I haven't in the bookshelf, but if need be, I should be able to locate the missing issue. /Per W On Thu, 23 Jan 2003, Mark Smith wrote: > 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 ( fr= om > 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 i= t > 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 nothi= ng > 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 th= is > case, your usermode program would open the PortTalk device driver and pas= s > data to the driver through IOCTL calls. The driver then talks to the I/O > port(s) in ring 0. > > 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 ba= sed > 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/o= utp > calls > -------------------- > > > > Regards > Mark > > --- > 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 > > > > The information contained in this e-mail message (and a |
|
From: Santiago P. C. <San...@yd...> - 2003-01-23 12:09:15
|
Hi *, It sounds great that you've finally found what you were looking for! So there's no need to continue discussing unnecesary alternatives ;o) Best regards, ~Santy -----Original Message----- From: Mark Smith [mailto:mar...@li...] Sent: jueves, 23 de enero de 2003 12:02 To: dev...@li... Subject: RE: [Dev-C++] _outp & _inp under windows 2000 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 :-~( ) 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. 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 --- 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 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. ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -------------------------------------------------------------------------------------- This message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. No confidentiality or privilege is waived or lost by any wrong transmission. If you have received this message in error, please immediately destroy it and kindly notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Opinions, conclusions and other information in this message that do not relate to the official business of Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it. -------------------------------------------------------------------------------------- |
|
From: Per W. <pw...@ia...> - 2003-01-22 20:57:07
|
Sorry, but normally you can't have a portable way of accessing I/O ports, since I/O ports are handled by the OS drivers. For some special ports, such as COM, LPT, the OS have reasonable high-level access methods that wxWindows etc may use to support portable applications. For the majority of ports - such as data acquisition boards, sound cards etc, you normally have to write dedicated low-level drivers for the access. There are a couple of companies that sells multi-platform driver SDK tools, where they supply a low-level assembler part for different OS, and you write a higher-level C/C++ "busines-logic" for the hardware. Thereby, you don't have to know everything about the different operating systems. Old data acquisition software written for MsDos, Win 3.1, Win95, Win98 etc are designed for a situation where there either doesn't exist a memory management unit or no privileged CPU instructions, or where the operating system gives carte blanche and allows a relatively free read/write in the IO and expansion board memory address spaces. This means that the doesn't make use of device drivers, but instead perform port IO or memory operations directly to the hardware. To get such a software to work on a new OS, without rewriting the software, would require the OS exception handler to catch illegal memory and IO accesses and depending on source and/or target perform the same operation instead, and then return the result to the application as if the application had done it itself. Such emulation creates a HUGE overhead meaning that it's only meaningful to even think about it for low-speed devices. /Per W On Wed, 22 Jan 2003, Santiago Palmier Campos wrote: > Hi *, > > You can consider porting your app to wxWindows, it is not only a GUI > library, it is a complete portable framework. > You can use the latest wxWindows stable release (2.4.0) and wxCTB > communications package by Joachim Buermann (http://www.iftools.com/), it = is > not GUI based so it can be used in console apps. > > It's an "easy" way to have a portable app that accesses I/O ports... > > Regards, > Santy > > -----Original Message----- > From: Flameeyes [mailto:dap...@li...] > Sent: mi=E9rcoles, 22 de enero de 2003 19:09 > To: dev...@li... > Subject: Re: [Dev-C++] _outp & _inp under windows 2000 > > > Mark Smith wrote: > > I have some data acquisition software which runs OK on win98 but > > because you cannot address the hardware directly with win 2000 it wont > > work, It is a console based application, is there an easy way for me > > to modify the code so it will run under win 2000? > I think that you can't. > Only SYSTEM level software can access directly the I/O ports, all other > software can only open it as a file [and is not a great method, i tried > it for one program]. > > -- > Flameeyes > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! Can't afford= IT > training? All 2003 ictp students receive scholarships. Get hands-on train= ing > in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > -------------------------------------------------------------------------= ------------- > This message and any files transmitted with it are confidential and inten= ded solely > for the use of the individual or entity to whom they are addressed. No co= nfidentiality > or privilege is waived or lost by any wrong transmission. > If you have received this message in error, please immediately destroy it= and kindly > notify the sender by reply email. > You must not, directly or indirectly, use, disclose, distribute, print, o= r copy any > part of this message if you are not the intended recipient. Opinions, con= clusions and > other information in this message that do not relate to the official busi= ness of > Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given= nor endorsed by it. > -------------------------------------------------------------------------= ------------- > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! > Can't afford IT training? All 2003 ictp students receive scholarships. > Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |