c++ - Error instantiating COM object -


Currently I'm trying to use a CD DL which I have done on a simple system Everything is compiled successfully, but CoCreateInstace S_OK is returning at runtime, but somehow my object pointer is returning NULL.

This interface pointer is built on my class header. The strange thing is that on the method stack results, the same object is to immediately convert the same indicator type into the correct object, but the entry violation has been started while trying to make the latter call the __ hook a base violation class.

Some other aspects may be useful:

  • An attempt was made to run the program with CoInitalizeEx, which was started as COINIT_MULTITHREADED and COINIT_APARTMENTTHREADED < / Li>

  • This project is a DLL that uses

  • I have tried the same method without starting a new method and the error persists

  • I 've not created a test program (no threads, executable) and the object is created normally Security is, and has been fitted correctly. So my guess is that it relates to related DLL or some related to myself.

PS: As a bonus question, why does Google do not return anything related to COM? :)

It looks like a bug in the implementation of IUnknown :: QueryInfface of COM objects - no settings S_OK after returning to the output pointer.

Cockret Instructions for In-Peace Server is basically:

  • Load DLL in memory
  • Delgate Class Object < / Li>
  • Allocates a new object, which makes ICLACSFTI :: Create a Constance call
  • Call the IUnknown: Interface on the new object to get the query interface.
  • / P>


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -