Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.1 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1998 - 1999
  4. Module Name:
  5. IASEnumerableAttributeEditor.h
  6. Abstract:
  7. Declaration of the CIASEnumerableAttributeEditor class.
  8. This class is the C++ implementation of the IIASAttributeEditor interface on
  9. the Enumerable Attribute Editor COM object.
  10. See IASEnumerableAttributeEditor.cpp for implementation.
  11. Revision History:
  12. mmaguire 06/25/98 - created
  13. --*/
  14. //////////////////////////////////////////////////////////////////////////////
  15. #if !defined(_ENUMERABLE_ATTRIBUTE_EDITOR_H_)
  16. #define _ENUMERABLE_ATTRIBUTE_EDITOR_H_
  17. //////////////////////////////////////////////////////////////////////////////
  18. // BEGIN INCLUDES
  19. //
  20. // where we can find what this class derives from:
  21. //
  22. #include "IASAttributeEditor.h"
  23. //
  24. // where we can find what this class has or uses:
  25. //
  26. //
  27. // END INCLUDES
  28. //////////////////////////////////////////////////////////////////////////////
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CIASEnumerableAttributeEditor
  31. class ATL_NO_VTABLE CIASEnumerableAttributeEditor :
  32. public CComObjectRootEx<CComSingleThreadModel>,
  33. public CComCoClass<CIASEnumerableAttributeEditor, &CLSID_IASEnumerableAttributeEditor>,
  34. public CIASAttributeEditor
  35. {
  36. public:
  37. CIASEnumerableAttributeEditor()
  38. {
  39. }
  40. DECLARE_REGISTRY_RESOURCEID(IDR_NAPSNAPIN)
  41. BEGIN_COM_MAP(CIASEnumerableAttributeEditor)
  42. COM_INTERFACE_ENTRY(IIASAttributeEditor)
  43. COM_INTERFACE_ENTRY(IDispatch)
  44. END_COM_MAP()
  45. // IIASAttributeEditor overrides
  46. protected:
  47. STDMETHOD(SetAttributeValue)(VARIANT *pValue);
  48. STDMETHOD(ShowEditor)( /*[in, out]*/ BSTR *pReserved );
  49. STDMETHOD(get_ValueAsString)(/*[out, retval]*/ BSTR *pVal);
  50. STDMETHOD(put_ValueAsString)(/*[in]*/ BSTR newVal);
  51. STDMETHOD(SetAttributeSchema)(IIASAttributeInfo *pIASAttributeInfo);
  52. private:
  53. long ConvertEnumerateDescriptionToOrdinal( BSTR bstrDescription );
  54. long ConvertEnumerateIDToOrdinal( long ID );
  55. CComPtr<IIASEnumerableAttributeInfo> m_spIASEnumerableAttributeInfo;
  56. };
  57. #endif // _ENUMERABLE_ATTRIBUTE_EDITOR_H_