I/O Port Functions UDF
Windows 7 and x64-compatible!
This is a simple I/O (Input/Output) UDF for interacting with ports. The ability to write to ports was stripped from Windows with Vista+. While many do not miss this ability, there are some uses still in existence:
- Re-enable the internal PC Speaker - the good ol' "Beep" function can be restored using basic I/O
- PS/2 Keyboard Functions - Turn it off/on, mess with LED's, inject keys into the keyboard output stream - even thwart UAC prompts! =O
- Also work with Parallel, Serial (COM), PS/2 mouse, and miscellaneous ports that devices interface through using I/O operations
- 20: The PC Keyboards - Part One and Part Two
- 21: The PC Parallel Ports - Part One, Part Two, and Part Three
- 22: The PC Serial Ports - Part One and Part Two
- 23: The PC Video Display
- 24: The PC Game Adapter - Part One, Part Two, Part Three and Part Four
- 8042 Keyboard Controller
- 8042 Keyboard Commands & Responses
- Keyboard Controller Commands, Keyboard Commands and Keyboard Scancodes
- The PS/2 Mouse
IOInstallx86 and IOInstallx64 are included to help with the install. Run these once to install the DLL's and drivers. (Administrator rights are required!)
In addition to the base _IOFunctions UDF, I've included _IOBeep, which is based on trancexx's _Beep function, and _IOKeyboardFunctions [PS/2 only*]. There are now three examples of the UDF usage included: IOBeepExample, IOCMOSReadExample (based on trancexx's CMOS code), and IOKeyboardExamples. If anyone else has more code suggestions, feel free to add to the thread.
*Update: Some BIOS's allow Legacy USB Port 64/60 Emulation, which may allow the _IOKeyboardFunctions to work for USB (non-PS/2) Keyboards, though this is untested thus far.
While I bundle the binaries with my code, remember they are not my own. However, they are released as freeware. To ensure proper credit goes where it belongs, I've included the Readme files from the download (linked above), as well as a link to the original page.
Ascend4nt's AutoIT Code License agreement:
While I provide this source code freely, if you do use the code in your projects, all I ask is that:
- If you provide source, keep the header as I have put it, OR, if you expand it, then at least acknowledge me as the original author, and any other authors I credit
- If the program is released, acknowledge me in your credits (it doesn't have to state which functions came from me, though again if the source is provided - see #1)
- The source on it's own (as opposed to part of a project) can not be posted unless a link to the page(s) where the code were retrieved from is provided and a message stating that the latest updates will be available on the page(s) linked to.
- Pieces of the code can however be discussed on the threads where Ascend4nt has posted the code without worrying about further linking.
- Added _IOKeyboardFunctions UDF
- Added IOKeyboardExamples and IOCMOSReadExample (based on trancexx's CMOS code)
Edited by Ascend4nt, 26 September 2011 - 06:00 AM.