#1
  1. No Profile Picture
    Designer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    104
    Rep Power
    13

    Question Controlling LPT port with C++


    I have Borland C++ 5.02 and I made something wich can be controlled through a printerport. BUT I have windows 2000 and I have heard I can't use outport functions to control it (in the dos.h header file). Are there header files that do have a right function or any idea's on how to control printer port with win 2k?
  2. #2
  3. No Profile Picture
    Your Friend
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Posts
    9
    Rep Power
    0
    Well, in Visual C++, I use "_outp" function present in conio.h. Check your Borland C++ documentation for a similar function.....should be somewhere in conio.h I guess.
  4. #3
  5. No Profile Picture
    Designer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    104
    Rep Power
    13

    Unhappy


    well the alternative is outport (b) but that does not work on windows 2k... I'm following programming classes (school) but this just is a riddle to the teachers I have discussed it with...
  6. #4
  7. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,625
    Rep Power
    4247
    Windows NT and W2K don't allow user processes to control the ports directly. There are other ways to get around to it though. You can either write a kernel mode driver or buy a third party component that implements the driver. If you're interested in writing your own, Serial Communications Developer's Guide by Mark Nelson is pretty good. You will also need the DDK from Microsoft. If you want a third party component, here are some links to some of them

    http://www.wcscnet.com/cdrvnbro.htm
    http://www.bcbdev.com/faqs/faq30.htm <--- Good source of information
    Blue Water Systems
    Tetradyne Software
    http://users.skynet.be/k-net/ParPort/index.html

IMN logo majestic logo threadwatch logo seochat tools logo