|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionI write this DLL for direct access i/o ports in windows NT/2K/Xp BackgroundFor compile all project you need VC71-2003. For compile kioport.sys you may have to install DDK. Kioport is based in PortTalk.sys from article: “Beyond Logic Port Talk I/O Port Driver”, http://www.beyondlogic.org/, and “A DDK's project wizard for VC2003” article http://www.thecodeproject.com/macro/ddkwizard.asp . Using the code1 - Copy kioport.sys in \windows\system32\drivers 2 - Add kioport.reg to register windows 3 - Reboot windows for activate service in register of windows. 4 - Add kport.h in your project and kport.lib 5 - Put Kport.dll in your same directory of application. Using the Kport-DLL // Returns a value from specific ports. BYTE Inportb(WORD PortNum); // Write a value to specific ports. void Outportb(WORD PortNum, BYTE byte);
PortNum: is a number port for example 0x378 ( LPT1). BYTE: data to send for specific PortNum in Ouportb, and data received in Inportb.
How use Sample-Dlg1 – Write a number bellow text “Write Value( )”, and click in Write button. 2 - Click in Read button. HistoryFirst version april 3/2005.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||