I'll start with the error:
Retrieving the COM factory class for component with CLSID {1CF0DE77-8CAE-11D1-82A2-0060083F9B01} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
Sometimes (not always), when I am executing a function that is defined by a COM
I get that error and there is no way to solve it.
I have already applied the "rules" in the COM definition:
- Have
Interface
-
Make sure you have defined in the classes:
[ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] [Guid("XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")] //GUID que se desee [ProgId("NombredeCom")] [ComDefaultInterface(typeof(IInterfaceDefinida))]
Where the GUID
is well defined, the IInterfaceDefinida
is comvisible
and does not give any errors or compilation warning.
But, sometimes, the error that I mentioned for no apparent reason appears. How can it be solved?