This documentation is archived and is not being maintained.

ATL Provider Error ATL2056

Error Message

Derive from either class1 or class2, not both.

The class is derived from two incompatible classes. To resolve, remove the derivation from either class1 or class2.

The following sample generates ATL2056.

// ATL2056.cp
// compile with: /c
// ATL2056 expected
#define _ATL_ATTRIBUTES
#include <atlbase.h>
#include <atlcom.h>


[ dual ]
__interface IATL2056 : IDispatch
{
   HRESULT Method1();
};

[ coclass ]
class CATL2056 : public IDispatchImpl<IATL2056>
   public IATL2056 // to resolve, comment this line out
{
   public :
   HRESULT Method1()
   {
      return S_OK;
   }
};
Show: