Page 1 of 1
C# windows form error: COM class retrieving failed
Posted: Monday 26 October, 2015 - 17:21
by LAC-Bursi
Hello community,
I'm developing a project in which I have to open Enterprise Dynamics 9 from a windows form written in C# language and developed on Visual Studio 2012 environment.
Should I distribute this project to other PCs in which the ED license is installed, but not Visual Studio 2012.
Have you some suggestions how to solve this issue?
If I try to run the project on a machine without Visual Studio, this error occurs:
"Retrieving the COM Class Factory for Component with CLSID {XXX} failed due to the following error: 80040154."
Best Regards
Thanks
Fabio
Re: C# windows form error: COM class retrieving failed
Posted: Tuesday 27 October, 2015 - 10:06
by MatthijsJongboer
Hello Fabio,
I'm not sure what the cause for this problem is.
First make sure you run Enterprise Dynamics 9 with elevated administrative rights once (per user account) since Enterprise Dynamics 9 is a self registering COM server. This means other applications can locate and start it.
If that is already done, check your dependencies of your C# project. Also make sure your target platform is X86.
Regards, Matthijs
Re: C# windows form error: COM class retrieving failed
Posted: Tuesday 27 October, 2015 - 16:03
by LAC-Bursi
Hello Matthijs,
You got it!!!!
The problem was that the target machines don't have the administrative rights on my project and they aren't able to run it.
add in the app.manifest this instruction:
Code: Select all
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
and now it works well.
Thanks for your support
Fabio
Re: C# windows form error: COM class retrieving failed
Posted: Monday 09 November, 2015 - 11:53
by LAC-Bursi
Hello Matthijs,
Your solution works well for some target machines, but not for all.
I need to register EDDev.exe (I mean the ActiveX object) on the target machine.
I try to execute regsvr32 EDDev.exe but returns this error:
Code: Select all
The module "EDDev.exe" waas loaded but entry-point DllRefisterServer was not found. Make sure that "EDDev.exe" is a valid DLL or OCX file and then try again
How can I resolve this issue?
Thanks
Fabio
Re: C# windows form error: COM class retrieving failed
Posted: Monday 09 November, 2015 - 12:13
by MatthijsJongboer
Hello Fabio,
Unfortunately, it is not possible to use regsvr32 since the executable is not a component that can be registered this way.
Execution once with elevated administrative rights is the only option.
Regards,
Matthijs