Using 32-bit COM Call in 64-Bit Windows Application …

This was a new problem for me since I rarely ever need to write software that calls a COM object that is running on a second machine.  I am working on a data collection system that will integrate with our ERP system and is accessing it through the API that they provide.  The ERP system that I am connecting to is a 32-bit application and it will NOT run on a 64-bit system.  There is still some legacy code that they need to get migrated, and they are working on a full 64-bit update.  In my Visual Studio 2008 project I have a reference to a dll file that exposes the API needed to access the business rules and import or export data.  If I compile the project and run it on a 64-bit system, to program runs fine until I make a call against the API.  I then get this error:

“System.DllNotFoundException: Unable to load DLL ‘SERVICES’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)”

After digging around, I found this is because I am calling a COM object that in turn is calling a 32-bit object which is not supported.  It is the act of the COM object running in the WOW64 subsystem making a call to a 32-bit object that is causing the problem.  At lest for the application that I am working on now, I was able to tell Visual Studio that the target CPU was a x86 and then everything ran fine.  This setting can be found at Project > Properties > Compile > Advanced Compile Options

screen

Hope this helps …

Windows 7, Fully Functional …

Well at this point I have pretty much managed to get everything working on Windows 7 Professional, 64-bit.  The last piece of the puzzle was getting a working VPN connection.  Although I was not able to get my NetGear client to work, or their SSL connection to work, there is a VPN client called Shrew Soft VPN Client that works quite well with the router that we are using.  I have tested it with a FVS336G and a FVX538.  Now to take some time and get it working with my home network.

The other item that was outstanding on the get working list was the VI Client for vSphere 4.  When trying to connect to the server I was getting the message “Error parsing the server <server name> “clients.xml” file.”  There was a good workaround here.

After getting there last two items corrected, I have to say that I couldn’t be happier with the performance and stability of Windows 7.

Windows 7 Installation … (Updated)

I started the move to Windows 7 last night.  Just to make things interesting, I also moved to the 64 bit version.  The base installation was quick and painless.  I was installing on a Dell Latitude D630 with a nVidia video controller.

Windows 7 did a pretty good job of finding and configuring my hardware.  The only drivers that I needed were for the video controller and the finger reader.  Everything seems to be working good and the computer is running noticeable faster with a lower resource usage.

Here is a list of the software that I have had problems with:

  • Alcohol 52% – Alcohol 120% does work and they are working on a update for Alcohol 52%.  This is causing me more irritation than anything.  I have converted all my install CDs to ISO images and use Alcohol to mount them.  Update: There has been a Windows update that has corrected this problem.  See the note below.
  • Acronis True Image Echo Workstation 9.1 – I just get a message that this program will not run on Windows 7.  Nothing that I could find on the Acronis web site, but there is a new version out.  The explorer shell extension seems to be working for browsing previously created images.  I may get stuck purchasing the new version.  I use this for backup and recovery.   Update: Purchased Acronis Backup & Recovery 10 Workstation and it supports Windows 7.
  • Microsoft SQL Server 2008 Developer Edition – This installs but would not run until Service Pack 1 was installed.

    Here is a list of the software that has installed without any problems:

    Note: There has been a Windows 7 update for x64 based systems that restores functionality to several programs. (KB974332)