Click here to Skip to main content
6,295,667 members and growing! (15,045 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.1Win2K, WinXP, Win2003VS.NET2003, Dev
Posted:6 Apr 2005
Views:29,414
Bookmarked:24 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
9 votes for this article.
Popularity: 3.31 Rating: 3.47 out of 5
1 vote, 11.1%
1
1 vote, 11.1%
2

3
1 vote, 11.1%
4
6 votes, 66.7%
5

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


Member
I'm Javier Güerino Palacios.
I know MFC, PHP, C, C++, C#, Java, ASM-8086.
I study Ing. Electronics and Ing. Information systems.
Occupation: Web Developer
Location: Argentina Argentina

Other popular Hardware & System articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 7 of 7 (Total in Forum: 7) (Refresh)FirstPrevNext
Generalerror after include video.h Pinmemberjavad_20057:21 7 Aug '07  
QuestionProblem during read operation... Pinmemberdarxoul4:51 16 Nov '06  
GeneralErrors???? PinmemberdSolariuM1:57 29 Jul '06  
GeneralPower Manager PinmemberAhtsair Lin4:57 9 Oct '05  
GeneralVC 6.0 version PinmemberLee Middleotn15:39 6 Apr '05  
GeneralRe: VC 6.0 version PinmemberAndre12342:14 7 Apr '05  
GeneralRe: VC 6.0 version PinmemberXor25611: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-2009
Web15 | Advertise on the Code Project