Board index » Visual Studio » outportb available?!?!?

outportb available?!?!?

Visual Studio83
Hi there,



I would like to create a .dll from legacy code. It includes the inportb and

outportb commands. Are inportb and outportb available in any version that

can create a dll??



Thanks very much,



Russ


-
 

Re:outportb available?!?!?

Russ wrote:

Quote
Hi there,



I would like to create a .dll from legacy code. It includes the

inportb and outportb commands. Are inportb and outportb available in

any version that can create a dll??



They're illegal operations from user-mode code on all NT-based versions of

Windows. Access to I/O ports is intended to be restricted to kernel-mode

DLLs. If you look around on the 'net, you can find solutions to allow

user-mode access to I/O ports.



You might want to check out the resources/articles on www.lvr.com.



-cd





-

Re:outportb available?!?!?

Carl Daniel [VC++ MVP] wrote:



Quote
Russ wrote:



>Hi there,

>

>I would like to create a .dll from legacy code. It includes the

>inportb and outportb commands. Are inportb and outportb available in

>any version that can create a dll??



They're illegal operations from user-mode code on all NT-based versions of

Windows. Access to I/O ports is intended to be restricted to kernel-mode

DLLs. If you look around on the 'net, you can find solutions to allow

user-mode access to I/O ports.



You might want to check out the resources/articles on www.lvr.com.



In other words... Access to IO ports should be restricted to Windows drivers.

Have you looked for a Windows driver for your hardware?



--

Phil Frisbie, Jr.

Hawk Software

www.hawksoft.com">www.hawksoft.com



-

Re:outportb available?!?!?

Thanks very much for your help. I found a Device driver for windows xp which

allows the inportb/outportb functions (gives the user higher priviledges to

the I/O ports) at www.beyondlogic.org/porttalk/porttalk.htm">www.beyondlogic.org/porttalk/porttalk.htm



Russ



"Carl Daniel [VC++ MVP]" wrote:



Quote
Russ wrote:

>Hi there,

>

>I would like to create a .dll from legacy code. It includes the

>inportb and outportb commands. Are inportb and outportb available in

>any version that can create a dll??



They're illegal operations from user-mode code on all NT-based versions of

Windows. Access to I/O ports is intended to be restricted to kernel-mode

DLLs. If you look around on the 'net, you can find solutions to allow

user-mode access to I/O ports.



You might want to check out the resources/articles on www.lvr.com.



-cd







-