har du tidligere arbejdet med porttalk? så vidt jeg forstår af
http://www.beyondlogic.org/porttalk/porttalk.htm (bunden) skal "pt_ioctl.c" bruges for at få adgang til de simple funktioner:
Talking to the Device Driver - User Mode APIs
PortTalk also has IOCTLs to allow reading and writing to I/O Ports. In this case, your usermode program would open the PortTalk device driver and pass data to the driver through IOCTL calls. The driver then talks to the I/O port(s) in ring 0.
The Porttalk driver contains two IOCTL calls to read from and write to I/O Ports. A c source file, pt_iotcl.c can be used to provide easy support based on the popular inportb/outportb and inp/outp calls supported in earlier programming environments. By simply including pt_ioctl.c and calling OpenPortTalk when you program starts and ClosePortTalk when your program finishes you can have the functionality of the inportb/outportb and inp/outp calls.
#include
#include
#include
void __cdecl main(void)
{
unsigned char value;
printf("IoExample for PortTalk V2.0\nCopyright 2001 Craig Peacock\
nhttp://www.beyondlogic.org\n");
OpenPortTalk();
outportb(0x378, 0xFF);
value = inportb(0x378);
printf("Value returned = 0x%02X \n",value);
outp(0x378, 0xAA);
value = inp(0x378);
printf("Value returned = 0x%02X \n",value);
ClosePortTalk();
}