How can I resolve exception: "Retrieving the COM class factory...failed...80080005 Server Execution failed" from Codesoft?

1

Please help with any advice or troubleshooting tips for this error.

I'm in a small medical R&D+manufacturing company and we have a number of installations of Codesoft 2012, 2015, and 2018, on Windows 7 and Windows 10 machines. Codesoft is installed locally and each instance has it's own license, not running from a server. We have an in house application, developed by someone no longer here, (C# .NET VS2013) that we run which uses the Codesoft API for label printing. I made a few minor modifications to our program (not related to Codesoft) and built and deployed it (uses InstallShield single setup.exe if that matters). Previously, we did not have this problem, but on this build on certain PCs, when the Codesoft API is started, there is a 120 second delay, and the following exception is returned:

Application initialization failed with exception: Exception raised during initialization: Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT:0x80080005 (CO_E_SERVER_EXEC_FAILURE)).

This is the line of code that returns the exception:

Codesoft = new Tkx.Lppa.Application();

Of course this is just starting up the API, nothing special, and is the first point of use of the Codesoft API. Lppa.exe (the Codesoft program) does appear in Task Manager for the 2 minute duration. EDIT (It occurs on Windows 7 and 10, and with Codesoft 2015 and 2018, but never with Codesoft 2012. On Windows 7 32-bit machines with Codesoft 2018, it worked fine for a while, then started showing the error as well.) Launching Codesoft manually works ok. I never saw this issue during development, working on a Windows 10 machine with Codesoft 2012 (the version we have a dev license for). I have reached out to Codesoft (Teklynx) technical support, but they haven't helped (phone support refused for API, email only, no response yet).

Some troubleshooting I have attempted:

It's possible I may have missed something in the above links, and I'll probably go back through them and try again. EDIT Next step: Setting up a dev environment on a Win 7 machine and rebuild.

c#
.net
exception
windows-7
com-interop
asked on Stack Overflow Jul 9, 2020 by DM5854 • edited Jul 10, 2020 by DM5854

1 Answer

0

Solved. I was using the 2012 version of the API lppanet.dll in my build. That's why it worked on 2012 and not other versions (although the inconsistent operation on 2018 is odd). Using a higher level version works. I was thrown off by only having a dev license on 2012 (thinking that's the version that had been used previously, when it wasn't), and not being aware that it had been updated and wasn't forward compatible.

answered on Stack Overflow Jul 13, 2020 by DM5854

User contributions licensed under CC BY-SA 3.0