CoCreateInstance returning E_NOINTERFACE even though interface is found

后端 未结 4 1266
温柔的废话
温柔的废话 2020-12-05 20:58

I have a COM class CMyCOMServer implementing IMyInterface in one application, both with correct GUIDs. CMyCOMServer::QueryInterface wi

4条回答
  •  萌比男神i
    2020-12-05 21:54

    Could this be the threading model problem that Raymond Chen wrote about?

    Edit in reply to the comment:

    If your threading model is incompatible with the threading model of the object you're creating, then COM marshalling kicks in. And if the marshalling stuff isn't there, the error that comes out is E_NOINTERFACE, because the marshalling interface is missing.

    It's more about threading models than about marshalling, really.

提交回复
热议问题