I'm having trouble running a 32-bit .NET application on Windows 7 x64, which seems to be centered around a third-party COM library. Here's the setting:
Our application was written for 32-bit Windows XP, but we tried to configure it so that it worked correctly on 64-bit Windows. It relies on P / Invoke and COM Interop with several 32-bit third-party libraries. Getting 64-bit versions of these libraries is not possible.
The library in question is a COM wrapper provided by a supplier to its C-based frame library (not supported by Windows XP). This interface is much easier to work with. NET. However, on 64-bit Windows 7, the COM library does not seem to work during its initialization. The structure has an Init () function, which returns with success, but after that it does not behave "properly."
It is assumed that during the initialization process, the data structure should be viewed in the registry (the names of the DLL files we created and other metadata). Using the Sysinternals Process Monitor, I see that it is requesting in the 32-bit registry compatibility section, but does not seem to use what it finds.
I can reproduce this behavior by interacting with PowerShell's (x86) COM interface, so I don't think I have the wrong setup in Visual Studio.
Here is the kicker. If I run our x64 platform application from Visual Studio with the hosting process turned on, it works every time. If I turn off the hosting process or start Visual Studio from outside, it will fail every time.
Any ideas on a hosted environment that allows this COM interaction to succeed?
UPDATE: the application certainly works in 32-bit mode. Visual Studio is configured to create it for x86, and I can see * 32 after its name in the task manager. The process monitor also shows the WOW64 libraries used.
source
share