clarity on "AnyCPU/x64/x86" for Class not registered Exception

0

Here is my scenario: I am migrating a windows application which was built on VS2005/VS2008(not sure on which it was built). Objective of the migration is the windows application should run in Windows 10 OS systems.I am using VS2013 now. upgraded the Frame work version from 2 to 4.5.1. We are using an interop dll(lets say interop.xyz dll) for communication with MQ(not sure what this is).Don't have the source code the interop.xyz. Don't know is it supporting both 64/32 bit versions. Below is the code snippet where I am getting an exception

colResults = new xyz.QueryResultCollection();

Below is the exception.

Retrieving the COM class factory for component with CLSID {690CFE43-BBB9-11D2-B60E-00203544F994} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

After searching in online forums I found that I should register the interop.xyz dll. I tried many ways to register(tried regsrv.exe in cmd(for both System32/SysWOW64).But the registration was not successful). I thought the interop.xyz dll was built to support only 32 bit machines.

After doing some more searching I found the solution to the issue. I have changed the platform target from "anyCPU" to "x86". Then i could open the application which out issues. But now my major concern is if I deploy this source code in WINDOWS 10 OS machines,will the application work? If not then how could I register the dll instead of changing the target platform.

I am not sure what I am doing is correct. The application which I am migrating now was last modified in 2010 and there is no-one to give me any information about the application. I am just left alone to work with. Someone please suggest me a proper way to handle my current issue so that it should work in WINDOWS 10 OS systems. Thanks in advance. Note: My current VM specs---> Windows 7 64 bit OS

.net
winforms
com-interop
winforms-interop
dllregistration
asked on Stack Overflow Nov 6, 2017 by user337986

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0