CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Location
    Vienna
    Posts
    3

    Question 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

  2. #2
    Join Date
    Mar 2002
    Location
    INDIA
    Posts
    135
    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

  3. #3
    Join Date
    Feb 2003
    Location
    Vienna
    Posts
    3

    Talking

    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
  •  





Click Here to Expand Forum to Full Width

Featured