View Single Post
  #19  
Old 25-07-2005, 09:26 PM
davidpretorius's Avatar
davidpretorius
lots of eyes on you!

davidpretorius is offline
 
Join Date: Jun 2005
Location: Launceston Tasmania
Posts: 7,381
Thanks Lex, unfortunately "NOT compatible with Win 2000/XP"
And here is why

"Unlike Windows 95 & 98, Windows NT/2000/XP will cause an exception (Privileged Instruction) if an attempt is made to access a port that you are not privileged to talk too. Actually it's not Windows NT that does this, but any 386 or higher processor running in protected mode."

"There are two solutions to solving the problem of I/O access under Windows NT. The first solution is to write a device driver which runs in ring 0 (I/O privilege level 0) to access your I/O ports on your behalf. Data can be passed to and from your usermode program to the device driver via IOCTL calls. The driver can then execute your I/O instructions. The problem with this, is that it assumes you have the source code to make such a change. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o:p></o:p>
Another possible alternative is to modify the I/O permission bitmap to allow a particular task, access to certain I/O ports. This grants your usermode program running in ring 3 to do unrestricted I/O operations on selected ports, per the I/O permission bitmap. This method is not really recommended, but provides a means of allowing existing applications to run under windows NT/2000. Writing a device driver to support your hardware is the preferred method. The device driver should check for any contentions before accessing the port. <o:p></o:p>

Well, there are lots of routines, source codes, device drivers, dlls available on the internet who will make your task easy. Like userport1, porttalk, give-io, remove-give-io, inpout32, etc etc."<o:p></o:p>
<o:p></o:p>
<o:p>I will do some more investigation</o:p>
Reply With Quote