I/O Port Functions

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
  • Work with Parallel, Serial (COM) port and miscellaneous 'ports' that devices interface through using I/O operations

For some good lists of ports and programming, see:
Chapters from 'The Art of Assembly Language':
On the PS/2 Keyboard and PS/2 Mouse, some more links:

The I/O DLL's, which will install the I/O drivers (they are embedded as a resource in the DLL), come from Phillip Gibbons.  His webpage, where more information, and extra downloads are, is available here: InpOut32 and InpOutx64Note: everything you need is already included in my UDF.

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.  There is 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 on the AutoIt forums.

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:
  1. 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
  2. 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)
  3. 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.
  4. 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)
A Scendant,
Oct 22, 2010, 7:12 PM