InpOut32 and InpOutx64
InpOut32 is a 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 it to Windows XP 64bit Edition (XP/2003 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 DLL, pure x64 applications.
I am pleased to announce that InpOutx64 now fully supports Vista x64 with signed drivers, 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.
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.
I reccomend 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-06) 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.
v188.8.131.52 New Build (23-03-2006):
The new version is an updated 32bit and 64bit DLL only (v184.108.40.206) If fixes a bug in the DLPortIO compatibility for LCDSmartie usage.
The driver has not changed.
v220.127.116.11 New Build (17-02-2007):
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.
v18.104.22.168 New Build (internal):
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.
v22.214.171.124 New Build (18-10-2008):
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.
v126.96.36.199 New Build (15-Aug-2010):
Removed bool's from header (replaced with BOOL). This is to maintain compatibility with other DLL’s (DLPortIO etc.).
v188.8.131.52 New Build (13-Jan-2011):
Removed references to WinRing0 which was discontinued.
Fixed uninitialized buffers & return from Inp32 > byte value!
v184.108.40.206 New Build (20-Jan-2011):
Added _stdcall to DlPortReadPortUshort, DlPortWritePortUshort, DlPortReadPortUlong, DlPortWritePortUlong to maintain compatibility with old DLPortIO driver.
From Version 220.127.116.11, I have added, simple compatibility with DLPortIO that should allow LCDSmartie 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 18.104.22.168 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). If you do, you can try downloading the latest Microsoft C++ runtimes (2005 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:
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.
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.
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!
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.
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 InpOut:
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.
I haven’t got any .Net samples... Again, any original samples that Logix4U provides should work with my version - however, it is worth noting that .Net 2.0 is 64bit aware, and by default will run in 64bit on an x64 machine.
Important: If your .Net 2 assembly is running in 64bit, it MUST use InpOutx64.dll. If it runs in 32bit, it MUST use inpout32.dll. This may cause some issues as you may have to decide which DLL to use, at runtime.
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!
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 Freeware. Copyright Logix4U & Highresolution Enterprises (x64 port).
Page Last Updated: 15th January 2012.