I have created an ATL COM Server C++ project using a Visual Studio 2005 wizard. I added a new COM class using the ATL Simple Object wizard. Now when I try to create this COM class instance from my server (calling CoCreateInstance within the ATL server) I get CO_E_SERVER_EXEC_FAILURE error from CoCreateInstance. When I try to create this object from another project (another Win32 executable), the object gets created correctly. What causes this error?
1 Answer
There's an excellent blog post available here that discusses the reasons you can get this HRESULT.
2 Comments
Jeffrey Bosboom
Hi Hans, sorry to be that guy, but this looks like a link-only answer. The post looks like a good resource, but I'm not familiar enough with COM to tell which parts of it are worth quoting here. Could you take a look and include the most important parts in this answer?
Hans Passant
Hmya, I posted this over 6 years ago. I don't buy into this "we changed the rules, now you have to go back and edit ten thousand answers" scheme. That is a job, nobody is paying me to do it and slavery is illegal by the USA constitution. This site is collaboratively edited, if you don't know how to do it then I'm really not that interested in you notifying me about it. Hard to imagine anybody would be.