Helpful Information
 
 
Category: C Programming
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?

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.

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...

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 (http://www.bsquare.com/default.asp)
Tetradyne Software (http://www.tetradyne.com/)
http://users.skynet.be/k-net/ParPort/index.html










privacy (GDPR)