This documentation is archived and is not being maintained.

ATL Provider Warning ATL4058

Error Message

"interface" is not an interface defined in embedded IDL. It will not be replaced with the corresponding IDispatchImpl.

You may receive this warning in conjunction with a C4199 compiler warning when you build attributed Active Template Library (ATL) code. The error occurs because the interface is not defined in embedded interface definitions in your code and the attribute provider cannot replace the interface with the corresponding IDispatchImpl.

If your interface is a dispinterface or a dual interface and you are implementing the IDispatch methods, you can ignore the warning.

If however your interface is a dispinterface or dual interface and you expect the attribute provider to implement the IDispatch methods (either through the use of an IDispatchImpl or the compiler to generate the IDispatch methods), the warning is letting you know that the attribute provider cannot implement the IDispatch methods for you. To fix this, derive your class from IDispatchImpl instead of the interface.

The following sample generates ATL4058.

// ATL4058.cpp
// compile with: /c /W4 /WX
// ATL4058 expected
#include <atlbase.h>
#include <atlcom.h>
#include <mshtml.h>

[ coclass ]
class ATL4058 : public IHTMLFiltersCollection
public :
    virtual HRESULT STDMETHODCALLTYPE get_length(long *p)
       return E_NOTIMPL;
    virtual HRESULT STDMETHODCALLTYPE get__newEnum(IUnknown **p)
       return E_NOTIMPL;
      VARIANT *pvarIndex, 
      VARIANT *pvarResult)
       return E_NOTIMPL;