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 for everyone.

 

Please see the original author's site for a full description and original source code and binaries package.

 

 

Alternatives to InpOut32:

For developers, there is a new input output project in town, and it has its very own signed 64bit drivers. This new project, WinRing0 is open source and can be freely downloaded from http://openlibsys.org or their sourceforge page. Of course this has a different programming interface to InpOut23 but if you are developing a new application, I would recommend you take a look at WinRing0 instead of using InpOut simply because it offers much more functionality in a simular 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 'orriginal'. 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.

 

For developers:

The driver 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.

 

Development:

There are examples and usage instructions for the 32bit version on the original author's site ( www.Logix4u.net)

To use the pure 64bit version, all you need to do, is to link to my new InpOutx64.DLL using InpOutx64.lib. Everything else is the same.

 

Logix4U also has a COM object allowing you to use this in VB etc. I have not built the COM object but the original should work fine with the 32bit DLL provided here. From VB you can only write 32bit anyway. The 32Bit DLL will still install and run on Windows x64 using the 64bit driver.

NOTE: Because I used Visual Studio 2005 to build the DLL's you may need the latest 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!

 

 

Update History:

The initial build (DLL v1.0.0.1) 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 v1.0.0.2 (dated 23-12-2005) should work properly on both OS types. 


UPDATE: (26-02-06)  32bit DLL for 1.0.0.2 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.

v1.0.0.6 (26-02-2006):
The new version is an updated 32bit and 64bit DLL only (v1.0.0.6).

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.

v1.0.0.7 New Build (23-03-2006):
The new version is an updated 32bit and 64bit DLL only (v1.0.0.7) If fixes a bug in the DLPortIO compatibility for LCDSmartie usage.
The driver has not changed.

 

v1.0.0.8 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.

 

v1.1.0.0 New Build (internal):
The new version used test signing of the drivers which worked only locally using my own internal certificates. There was no funcitonal changes.
The driver has been renamed from HWInterface.sys to InpOut.sys and HWinterfacex64.sys to InpOutx64.sys.

 

v1.2.0.0 New Build (18-10-2008):

This version is the first to include signed drivers for use with Vista and Server 2008 x64 with no requirment to press F8 at boot or enable development (test signing mode). Everyone can now use ImpOut on the latest MS x64 operating systems.

 

 

Notes:
From Version 1.0.0.7, 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 1.0.0.7 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:

 

Binaries only - x86 & x64 DLLs and libs.   (Mirror)

For end users of applications designed for use with InpOut32 (for example LCD Smartie) this is all you need.

It also containts 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 the DLLs (binaries) above. If your 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.

 

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.

Note:
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):

  • Inp32()
  • Out32()
  • IsInpOutDriverOpen()
  • DlPortReadPortUchar()
  • DlPortWritePortUchar()

Contact:

Contact me if you have any questions/queries.

Feel free to sign up and discuss any problems in my own Forums

Alternatively you can contact me at the Planet AMD64 website and forums. My PAMD64 username is PhilG PM

As a last resort, you can try my email address but PLEASE be aware that my anti-spam is set quite high so if you don't get a reply PM me on my forum OR PlanetAMD64!!

 

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 know viruses.

This product is released as Freeware. Copyright Logix4U & Highresolution Enterprises (x64 port).

Last Updated: 19th Octoberl 2008.