View Single Post
  #15 (permalink)  
Old 07-24-2008, 10:33 PM
dargueta dargueta is online now
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 863
Last Blog:
Programs Under the Hoo...
Credits: 0
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default Re: help with port sensing program

Yech...I have no idea, to be honest. I've never dealt with port I/O and stuff, mainly because I have nothing that does that sort of thing, except maybe the Internet and a few other bland devices. I guess you can try like MeTh0Dz said (i.e. use WinAPI functions CreateFile, ReadFile, etc); if that doesn't work, I don't know what to tell you.

CreateFile()
ReadFile()

Use CloseHandle() to close the handle once you're done. Read the corresponding registry keys (outlined by MeTh0Dz above) to find the device name, then use the device name as the "file name" when calling CreateFile(). Make sure you set read and write privileges.
Reply With Quote