5,693,062 members and growing! (15,895 online)
Email Password   helpLost your password?
General Reading » Hardware & System » General     Advanced

Kport Direct Access I/O Ports under Win NT/2000/XP

By Guerino Palacios

Two simple function for acces i/o ports skiping H.A.L
VC7.1, C++Windows, NT4, Win2K, WinXP, Win2003VS.NET2003, Visual Studio, Dev

Posted: 6 Apr 2005
Updated: 6 Apr 2005
Views: 26,451
Bookmarked: 23 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
9 votes for this Article.
Popularity: 3.31 Rating: 3.47 out of 5
1 vote, 11.1%
1
1 vote, 11.1%
2
0 votes, 0.0%
3
1 vote, 11.1%
4
6 votes, 66.7%
5
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

Sample Image - kport.jpg

Introduction

I write this DLL for direct access i/o ports in windows NT/2K/Xp

Background

For 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 code

1 - 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 is so easy. Here is the function definition and the explanation follows:

// 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-Dlg

1 – Write a number bellow text “Write Value( )”, and click in Write button.

2 - Click in Read button.

History

First version april 3/2005.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Guerino Palacios


I'm Javier Güerino Palacios.
I programer with MFC about 5 yeard.
I study Ing. Electronics
Occupation: Web Developer
Location: United States United States

Other popular Hardware & System articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 7 of 7 (Total in Forum: 7) (Refresh)FirstPrevNext
Generalerror after include video.hmemberjavad_20057:21 7 Aug '07  
QuestionProblem during read operation...memberdarxoul4:51 16 Nov '06  
GeneralErrors????memberdSolariuM1:57 29 Jul '06  
GeneralPower ManagermemberAhtsair Lin4:57 9 Oct '05  
GeneralVC 6.0 versionmemberLee Middleotn15:39 6 Apr '05  
GeneralRe: VC 6.0 versionmemberAndre12342:14 7 Apr '05  
GeneralRe: VC 6.0 versionmemberXor25611:53 7 Apr '05  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 6 Apr 2005
Editor:
Copyright 2005 by Guerino Palacios
Everything else Copyright © CodeProject, 1999-2008
Web18 | Advertise on the Code Project