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

By Güerino Palacios

Two simple function for acces i/o ports skiping H.A.L

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.

About Güerino Palacios

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值