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
> 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
[quoted text clipped - 12 lines]
>
> 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
Colin Desmond - 29 Nov 2005 20:03 GMT
Fixed it, turns out the DLL needed to be an MFC Extension one rather than a
regular one.
> > 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
[quoted text clipped - 18 lines]
>
> Colin