R
Robert Ginsburg
I have an ATL DLL that hosts a COM object. Without managed extensions the
object compiles and works fine. Now with some assistance from Will DePalo
(on a different thread in this group) I figured out how to add CLR support
to my object and how to call into managed code. The code and the calls work
, however when the host application drops the reference to my COM object (
specifically to a class that has clr support ) the ATL framework throws an
errorr and returns RPC_S_WRONG_KIND_OF_BINDING while the reference is being
dropped.
If I comment out the clr code and remove the clr flag, the code executes
fine, If I add clr support to the module but make no clr calls I get the
error. So it appears that simply adding clr support to an ALT object is
causing the problem. The ATL class is defined as a single threaded IDispath
implementation using the ATL libraries (sample below):
class ATL_NO_VTABLE CCSharpMEVT :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CCSharpMEVT, &CLSID_CSharpMEVT>,
public ICSharpMEVT,
public IDispatchImpl<_iMEVT, &__uuidof(_iMEVT), &LIBID_MEVT, /* wMajor
= */ 56, /* wMinor = */ 3>
Has anyone seen this before ? The COM string error equates to "The string
binding is invalid."
Thanks in advance for any help or advice
Robert
object compiles and works fine. Now with some assistance from Will DePalo
(on a different thread in this group) I figured out how to add CLR support
to my object and how to call into managed code. The code and the calls work
, however when the host application drops the reference to my COM object (
specifically to a class that has clr support ) the ATL framework throws an
errorr and returns RPC_S_WRONG_KIND_OF_BINDING while the reference is being
dropped.
If I comment out the clr code and remove the clr flag, the code executes
fine, If I add clr support to the module but make no clr calls I get the
error. So it appears that simply adding clr support to an ALT object is
causing the problem. The ATL class is defined as a single threaded IDispath
implementation using the ATL libraries (sample below):
class ATL_NO_VTABLE CCSharpMEVT :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CCSharpMEVT, &CLSID_CSharpMEVT>,
public ICSharpMEVT,
public IDispatchImpl<_iMEVT, &__uuidof(_iMEVT), &LIBID_MEVT, /* wMajor
= */ 56, /* wMinor = */ 3>
Has anyone seen this before ? The COM string error equates to "The string
binding is invalid."
Thanks in advance for any help or advice
Robert