Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have added dual interfaces to an existing class in MFC application but when i run the client the cocreateinstance is failing with the error 0x80080005 (CO_E_SERVER_EXEC_FAILURE) Server execution failed.
https://msdn.microsoft.com/en-us/library/4h56szat.aspx[^]
C#
hr = ::CoCreateInstance(CLSID_Application, NULL, CLSCTX_LOCAL_SERVER, IID_IApplication, (void**)&m_IApplication);

    if (SUCCEEDED(hr)) {
            if (m_IApplication)
            {
                m_IApplication->Show();
            }
        }



please help.
Posted
Updated 28-Apr-15 23:29pm
v3

1 solution

In reading this blog my first approach would be some security/rights issues. Has the starting process enough rights to start the app or is it bug. A typo of the UUID and is CLSCTX_LOCAL_SERVER the right flag?
 
Share this answer
 
Comments
Hydera 29-Apr-15 6:41am    
I Have the read the blog it tells about call CoRegisterClassObject but my application is an existing MFC application to which i am adding automation support and i had folllowed the example
http://www.codeproject.com/Articles/8202/Adding-automation-to-MFC-applications.

Is it something to do with calling coregisterclassobject in MFC server application?
i am running the server and client with administrative privilages hence i dont believe having and security issues.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900