The binding handle is invalid.

G

Guest

I have a COM component that performs logging in a managed MFC application.
The main body of the application is built using /clr, as are all of the MFC
and regular DLL's. The COM componet is not built using /clr.

When I make a call into the COM object from a "normal" C++ class (compiled
with /clr), everything is fine, but when it do it from a "ref" class I get
the following error when I try and call CoCreateInstance inside the COM
object:

The binding handle is invalid.

Does anyone know what might be causing this?

Thanks

Colin
 
G

Guest

Colin Desmond said:
I have a COM component that performs logging in a managed MFC application.
The main body of the application is built using /clr, as are all of the MFC
and regular DLL's. The COM componet is not built using /clr.

When I make a call into the COM object from a "normal" C++ class (compiled
with /clr), everything is fine, but when it do it from a "ref" class I get
the following error when I try and call CoCreateInstance inside the COM
object:

The binding handle is invalid.

Does anyone know what might be causing this?

Thanks

Colin

Sorry, I forgot to mention that when I call into the COM object sucessfully,
that is in the main GUI thread of the application, whereas the failed calls
occur in a thread used by a System::Threading::Timer callback method.

Colin
 
G

Guest

Fixed it, turns out the DLL needed to be an MFC Extension one rather than a
regular one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top