Question : ATL COM compilation error in atlcom.h

Hi,
I have written code to ctreate a n ATL COM object with 2 classes - "Encrypt" and "Decrypt". The method skeletons were generated automatically when i right clicked on the interfaces "IEncrypt" and "IDecrypt" and clicked on add method. There are no errors in the code that ive written. Even though I get the following error:

D:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(1827) : error C2259: 'CComObject' : cannot instantiate abstract class due to following members:

The erred line is indicated below from a chunk of code from atlcom.h:

static HRESULT WINAPI CreateInstance(void* pv, REFIID riid, LPVOID* ppv)
      {
            ATLASSERT(*ppv == NULL);
            HRESULT hRes = E_OUTOFMEMORY;
            T1* p = NULL;
      ==>      ATLTRY(p = new T1(pv))

Is this a common error? why does the complier show errors in a standard header file shipped by Microsoft? How can I rectify this?
thanx for the help

-Rajesh

Answer : ATL COM compilation error in atlcom.h

If you try to create a new instance of your class, you get the same errors
and warnings messages:

Find "HOWTO: Create ATL COM Objects" in MSDN.

Good Luck
Random Solutions  
 
programming4us programming4us