|
-
February 1st, 2003, 04:38 PM
#1
Parallels Port Status-/Controlregister in W2K
Hi there,
I need to know how to read/write to the status/control register of the Parallel Port in W2K with win32.
I know how to get the handle and use ReadFile / WriteFile but after hard recherching i didn't get an answer.
Pleas help,
thanks tryge
-
February 4th, 2003, 04:00 AM
#2
Hey you can not access any port directly from win2k as it's having it's previleged levels.
For that you have to create a driver which will allow you to access the parallel port. And after that open the driver handler. Then write to that handler, and read from that.
You acn use the functions _outp(), _inp() to write and read from the paralle port.
And one more things also... you can not do the both read and write operations for the status lines. It allows you only to do read, but with the control lines you can do both the operations.
If you want to have an example, then go to
http:\\www.beyondlogic.org it gives you somuch of code for doing your task...
All The Best
-srujan
-
February 4th, 2003, 06:11 AM
#3
Thank you for your help,
it works now!!! :-)
tryge
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|