Access to IO ports under XP

  • Thread starter Thread starter Nicolas Muller
  • Start date Start date
N

Nicolas Muller

I have tried to access IO ports under XP (just using _inp function in C++).

This triggers a privilege violation exception.
The reason is apparently that - by default - programs run under user mode,
and inp is a "sensible" instruction for the system.
We have to switch to system mode apparently or is there any smart solution
which is more convenient to the system ?

(in particular how is it possible to have access to the printer ports)

Does anyone know how to do that ?
Is there any available example anywhere ?
 
I have tried to access IO ports under XP (just using _inp function in C++).

This triggers a privilege violation exception.
The reason is apparently that - by default - programs run under user mode,
and inp is a "sensible" instruction for the system.
We have to switch to system mode apparently or is there any smart solution
which is more convenient to the system ?

(in particular how is it possible to have access to the printer ports)

Does anyone know how to do that ?
Is there any available example anywhere ?

Do a google search for a free program called userport.zip which
will give you user level access on XP to the hardware including
the parallel port. My test page below uses the parallel port to
switch web cams. I also use this on my XP machine for testing the
switchers conected to the parallel port. Once you run userport on
your XP machine you can twiddle the parallel port pins with debug
and such.

http://www.geocities.com/zoomkat/ppswitcher-demo.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top