windows-nt/Source/XPSP1/NT/ds/security/gina/samples/gptdemo/compdata.h

86 lines
2.1 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
//
// CComponentData class
//
class CComponentData:
public IComponentData,
public IPersistStreamInit
{
friend class CDataObject;
friend class CSnapIn;
protected:
ULONG m_cRef;
HWND m_hwndFrame;
LPCONSOLENAMESPACE m_pScope;
LPCONSOLE m_pConsole;
HSCOPEITEM m_hRoot;
LPGPEINFORMATION m_pGPTInformation;
public:
CComponentData();
~CComponentData();
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
//
// Implemented IComponentData methods
//
STDMETHODIMP Initialize(LPUNKNOWN pUnknown);
STDMETHODIMP CreateComponent(LPCOMPONENT* ppComponent);
STDMETHODIMP QueryDataObject(long cookie, DATA_OBJECT_TYPES type, LPDATAOBJECT* ppDataObject);
STDMETHODIMP Destroy(void);
STDMETHODIMP Notify(LPDATAOBJECT lpDataObject, MMC_NOTIFY_TYPE event, long arg, long param);
STDMETHODIMP GetDisplayInfo(LPSCOPEDATAITEM pItem);
STDMETHODIMP CompareObjects(LPDATAOBJECT lpDataObjectA, LPDATAOBJECT lpDataObjectB);
//
// Implemented IPersistStreamInit interface members
//
STDMETHODIMP GetClassID(CLSID *pClassID);
STDMETHODIMP IsDirty(VOID);
STDMETHODIMP Load(IStream *pStm);
STDMETHODIMP Save(IStream *pStm, BOOL fClearDirty);
STDMETHODIMP GetSizeMax(ULARGE_INTEGER *pcbSize);
STDMETHODIMP InitNew(VOID);
private:
HRESULT EnumerateScopePane(LPDATAOBJECT lpDataObject, HSCOPEITEM hParent);
};
//
// ComponentData class factory
//
class CComponentDataCF : public IClassFactory
{
protected:
ULONG m_cRef;
public:
CComponentDataCF();
~CComponentDataCF();
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
// IClassFactory methods
STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID FAR *);
STDMETHODIMP LockServer(BOOL);
};