COMP.H

///////////////////////////////////////////////////////////////////////////// 
// comp.h : IComponent Interface to communicate with MMC for results pane use
//
// This is a part of the MMC SDK.
// Copyright (C) 1997 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// MMC SDK Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// MMC Library product.
//

#ifndef __COMP_H_
#define __COMP_H_

#include <mmc.h>


/////////////////////////////////////////////////////////////////////////////
// CComponent - This class at this point is the basic interface to handle
// anything to do with the results pane. At this point it is
// mostly a stib place holder and serves no real purpose. It will
// get filled in and used in later steps.

class CComponent:
public IComponent,
public CComObjectRoot
{
public:

// ATL Maps
DECLARE_NOT_AGGREGATABLE(CComponent)

BEGIN_COM_MAP(CComponent)
COM_INTERFACE_ENTRY(IComponent)
END_COM_MAP()


CComponent();
~CComponent();

//
// IComponent interface members
//
STDMETHOD(Initialize)(LPCONSOLE lpConsole);
STDMETHOD(Notify)(LPDATAOBJECT lpDataObject, MMC_NOTIFY_TYPE event, long arg, long param);
STDMETHOD(Destroy)(long cookie);
STDMETHOD(GetResultViewType)(long cookie, LPOLESTR* ppViewType, long* pViewOptions);
STDMETHOD(QueryDataObject)(long cookie, DATA_OBJECT_TYPES type, LPDATAOBJECT* ppDataObject);
STDMETHOD(GetDisplayInfo)(RESULTDATAITEM* pResultDataItem);
STDMETHOD(CompareObjects)(LPDATAOBJECT lpDataObjectA, LPDATAOBJECT lpDataObjectB);

private:
LPCONSOLE m_pConsole; // from MMC
ULONG m_cRefs; // object refcount
};

#endif // __COMP_H_