InpOut32 and InpOutx64

     

 

 

02-March-2008 *NEW* Full 64bit support on Windows Vista.

 

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 which raises a small problem - "How can I get my application that uses InpOut32 to use the signed WinRing0 code and work on Vista x64?".

 

The answer is easy. I have provided an InpOut32 DLL that, rather than containing a driver, acts as a sub and passes the inout and output requests straight through to WinRing0.dll. Like my InpOut32 port, this supports both 32bit and 64bit applications through Inpout32.dll and InpOutx64.dll. Simply replace your existing InpOut dll with the stub version and place all the WinRing0 DLLs and .SYS files in the same folder and rerun your program.

 

This has been tested with LCDSmartie.

 

Download the InpOut32WinRing0 v1.0.0.0 stub DLLs.

There is also an alternate mirror download here.

 

NOTE: This download does not include the WinRing0 files themselves, you shoudl get them from the authors website.

 

 

 

How it used to be

 

The previous, full port of InpOut32 including the unsigned driver is still available but will not work on 64bit Vista dnd server 2008.

 

InpOut32 is a windows DLL and Driver to give direct access to hardware ports (for example the parallel and serial ports) 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.

 

NOTE. 64bit Vista requires signed drivers. I have now discovered that it is possible to disable this requirment by editing your boot configuration, however, this is not reccomended by Microsoft! Here is how to do it. If you follow this method, you do so at your own risk, and I can not guarantee that it will work. However, I have been able to install unsigned drivers, including InpOut32/x64 on Vista x64 :)

 

 

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

 

 

Installation:

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.

Usage:

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!

Important Update:

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.

 

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. (All you need if you’re not bothered about source code. Includes driver installed on demand. Required to integrate with your own program.)

 

Source for x86 & x64 DLLs (requires Visual Studio 2005 - maybe the free c++ express edition but I haven’t tried that)

Driver source code (Requires the Windows 2003 DDK to build either 32bit or 64bit version - AND a little knowledge of building device drivers!)

 

.NET 2.0 (2005) Example code (requires Visual Studio 2005 - maybe the free c# express/VB Express editions)

 

How to use this version 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: 27th April 2006.