InpOut32 is an open source windows DLL and Driver to give direct access to hardware ports (for example the parallel and serial port from user level programs. It is originally developed by the people at Logix4U for Windows 9x and 32bit variations of NT (NT/2000/XP/2003 etc.).
I have ported the original code (written by Logix4U) it to Windows XP 64bit Edition (XP/2003/Vista/7/8/8.1 x64 Editions) because the 32bit driver will not install or run on x64 systems. My new version supports both 32bit and 64bit systems running under WOW64 as 32bit applications, and with a new x64 DLL, pure x64 applications.
My port of InpOut32 supports both 32bit and 64bit systems running under WOW64 as 32bit applications, and with a new x64 DLL, pure x64 applications.
I am pleased to say that InpOutx64 now fully supports Windows Vista, 7 and 8.1 x64, allowing you to easily run any application designed to run with InpOut32 on Windows Vista+ and Server 2008+ x64 editions.
Many thanks to Warren at Red Fox UK for signing the drivers that allow all this to work on all current Windows operating systems.
Please see the original author's site for a full description and original source code and binaries package.
Installation of InpOut32:
For end users:
If an application has been written to make use of InpOut32.dll then all you need to do is place my version of InpOut32.dll in the same folder as the 'original'. This would usually be the same folder as the applications EXEcutable file. Most applications use the 32bit version of the DLL. This version is still capable of installing and running on x64 based operating systems, but the first time it is run, it must be elevated on Vista and later (run as Administrator).
Included in the binary download is a small "InstallDriver.exe" program to do this for you.
The driver (.sys file) is included, as a resource in the DLL. All you need to do is link to the appropriate DLL in your program and it should work.
NOTE: When the DLL loads for the first time, the appropriate driver is installed and used.
NOTE: Elevated permissions are required in Vista and later to install the driver. s
I recommend using runtime linking to the C interface (manually loading the library) in C++, in much the same as the interop calls from .NET work. However you can also use the .LIB and header files provided to link at compile time if that suits your application better.
There are examples and usage instructions for the 32bit version on the original author's site ( www.Logix4u.net ) and below in the download links.
To use the 64bit (x64) port (from a 64bit application), all you need to do, is use my x64 compatible DLL called InpOutx64.DLL, either using InpOutx64.lib or runtime linking (LoadLibrary, GetProcAddress etc.). Everything else is the same as the 32bit (InpOut32) DLL.
Please bear in mind, that on 64bit operating systems, many applications are still 32bit. If your application is 32bit you MUST use my version of InpOut32.dll which contains both 32bit and 64bit drivers and determines which one to install and use at runtime.
If your application is 64bit (x64) then use InpOutx64.dll. Both DLL's can install and talk to the 64bit (x64) driver on x64 editions of Windows.
NOTE: Because I used Visual Studio 2005 to build the DLL's you may need the 2005 SP1 Microsoft C++ Runtimes.
These should be available from Microsoft. You will have them if you have Visual Studio 2005. If you can’t find them, send me an email!
The initial build (DLL v220.127.116.11) I created didn't work properly in x64 because it still installed the 32bit driver (and called it hwinterfacex64.sys) oops! It was possible to use it by replacing the driver .sys file with the real hwinterfacex64 (included) but this was not the intended method of installation!
The build v18.104.22.168 (dated 23-12-2005) should work properly on both OS types.
UPDATE: (26-02-2006) 32bit DLL for 22.214.171.124 does not work on x64 windows :(
I am currently working on a fully functional 32bit DLL that loads a 64bit driver in x64 windows. It all went wrong because it loads the driver to the wrong place (thanks WOW64).
Anyone that has already used this, and has run the old version (on x64), should uninstall/delete the hwinterfacex64.sys in their system32 folder as it is probably the 32bit version. The new DLL will then install the correct file when it is started.
The new version is an updated 32bit and 64bit DLL only (v126.96.36.199).
This version fixes a bug that caused the 32bit DLL to fail on x64 windows - it did not load the driver correctly because the WOW64 file redirection caused the driver to be created in the wrong folder (\SYSWOW64\Drivers not System32\Drivers).
The driver has not changed.
The new version is an updated 32bit and 64bit DLL only (v188.8.131.52) If fixes a bug in the DLPortIO compatibility for LCDSmartie usage.
The driver has not changed.
The new version is an updated 32bit and 64bit DLL and a 32bit EXE for installing the driver in Windows VISTA.
If fixes a bug in the IsInpOutDriverOpen() interface.
The driver has not changed.
The new version used test signing of the drivers which worked only locally using my own internal certificates. There was no functional changes.
The driver has been renamed from HWInterface.sys to InpOut.sys and HWinterfacex64.sys to InpOutx64.sys.
This version is the first to include signed drivers for use with Vista and Server 2008 x64 with no requirement to press F8 at boot or enable development (test signing mode). Everyone can now use InpOut on the latest MS x64 operating systems.
Removed bool's from header (replaced with BOOL). This is to maintain compatibility with other DLL’s (DLPortIO etc.).
Removed references to WinRing0 which was discontinued.
Fixed uninitialized buffers & return from Inp32 > byte value!
Added _stdcall to DlPortReadPortUshort, DlPortWritePortUshort, DlPortReadPortUlong, DlPortWritePortUlong to maintain compatibility with old DLPortIO driver.
Updated the license terms to use the standard MIT License. See License.txt in the download(s).
From Version 184.108.40.206, I have added simple compatibility with DLPortIO that should allow LCDSmartie and others to use this DLL as a drop in replacement for DLPortIO in x64 windows. To do this, download just the binaries only package (below) then take the 32bit DLL (in the \Win32 folder), rename it to DLPortIO.DLL and copy it to your LCDSmartie folder. Read the DLPortIO.TXT file included in the ZIP for more information.
I have had confirmation that v220.127.116.11 works with LCDSmartie in Windows 2003 x64 using the above method.
You may get a "side by side" error when running Installdriver.exe on Vista (especially 64bit Vista and later).
If you do, you can try downloading the 2005 Microsoft C++ runtimes (SP1). For the 32bit version, go here. For the 64bit version, go here.
The following links are for my x64 port of the source code and examples of how it can be used:
Binaries only - x86 & x64 DLLs and libs. (Mirror)
For end users of applications designed for use with InpOut32 (for example LCDSmartie) this is all you need.
It also contains everything required to develop your own application. See the readme file for further information.
Source for x86 & x64 DLLs
This is the source code package for the DLLs (binaries) above. If you’re interested to see how it works or want to make your own modifications this is what you need. Requires Visual Studio 2005 (SP1) or later to build the code.
Driver source code
The source code for the driver.
This requires the Windows 2003 (or Vista) DDK to build either 32bit or 64bit version. A little knowledge of building device drivers would also be handy!
.NET 2.0 (2005) Example code
This example code shows you how to call InpOut from C# and VB.NET. This requires Visual Studio 2005 (or later). Maybe the free c# express/VB Express editions will also work.
C++ Sample Code
This example code shows you how to call InpOut from C++ using dynamic linking to the C style _stdcall interface at runtime (no need for LIB etc.)
How to use my port of InpOut32:
The original distribution of InpOut32 comes with various samples. Most of these samples still apply...
The VB6 sample provided with the original Logix4U distribution should work in exactly the same way. VB6 is 32bit ONLY and you should always use my InpOut32.dll.
The C++ example should also work, but I have also got a modified version here that you may want to look at. You also have to ensure you link to the correct DLL, InpOut32.dll for a 32bit EXE and InpOutx64.dll for a native x64 EXE.
My version of InpOut32.dll (and InpOutx64.dll) exports more functions that the original. The original only exports Inp32() and Out32().
This x64 bit compatible version exports the following functions (look in InpOut32.h for the complete definitions and types):
Alternatives to InpOut32:
There was, for a time, an input output project called WinRing0 . It had its own signed 64bit drivers and was open source.
However, this project has been discontinued. Best stick to InpOut32 for now!
Contact me if you have any questions/queries.
Feel free to sign up and discuss any problems in my own Forums
The Author makes no guarantee that this software is free from bugs and will not harm your system.
However, the author actively runs this software and all downloads have been checked for known viruses.
This product is released as open source (Freeware).