Comet makes COM programming look and feel like real C++ programming.

This is what COM looks like in ATL:

class CCoCarFactory :
	public ICarFactory
	public CComObjectRootEx<CComMultiThreadModelNoCS>,
	public CComCoClass<CCoCarFactory,&CLSID_CarFactory>,
	public IProvideClassInfoImpl<&CLSID_CarFactory>,
	public ISupportErrorInfoImpl<&IID_ICarFactory>
{
public:
BEGIN_COM_MAP(CCoCarFactory)
	COM_INTERFACE_ENTRY(ICarFactory)
	COM_INTERFACE_ENTRY(IProvideClassInfo)
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()

DECLARE_REGISTRY_RESOURCEID(IDR_CoCarFactory)

public:
	STDMETHODIMP CreateCar(BSTR model, ICar **ppCar)
	{
		if(!ppCar) return E_POINTER;
		typedef CComObject<CCar> CarObj;
		CarObj *pCar;
		HRESULT hr = CarObj::CreateInstance(&pCar);
		if(FAILED(hr)) return hr;
		hr = pCar->Init(model);
		if(FAILED(hr))
		{
			delete pCar;
			return hr;
		}
		pCar->QueryInterface(IID_ICar, reinterpret_cast<void**>(ppCar));
		return S_OK;
	}
}

This is what the same code looks like in Comet:

class coclass_implementation<CCoCarFactory> : public coclass<CCoCarFactory>
{
	public:
	com_ptr<ICar> CreateCar(const bstr_t &model)
	{
		return new Car(model);
	}
};