Leaked source code of windows server 2003
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.

106 lines
3.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation
  4. Module Name:
  5. IASVendorSpecificAttributeEditor.h
  6. Abstract:
  7. Declaration of the CIASVendorSpecificAttributeEditor class.
  8. This class is the C++ implementation of the IIASAttributeEditor interface on
  9. the Vendor Specific Attribute Editor COM object.
  10. See IASVendorSpecificAttributeEditor.cpp for implementation.
  11. Revision History:
  12. mmaguire 06/25/98 - created
  13. --*/
  14. //////////////////////////////////////////////////////////////////////////////
  15. #if !defined(_VENDOR_SPECIFIC_ATTRIBUTE_EDITOR_H_)
  16. #define _VENDOR_SPECIFIC_ATTRIBUTE_EDITOR_H_
  17. #pragma once
  18. //////////////////////////////////////////////////////////////////////////////
  19. // BEGIN INCLUDES
  20. //
  21. // where we can find what this class derives from:
  22. //
  23. #include "IASAttributeEditor.h"
  24. //
  25. // where we can find what this class has or uses:
  26. //
  27. //
  28. // END INCLUDES
  29. //////////////////////////////////////////////////////////////////////////////
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CIASVendorSpecificAttributeEditor
  32. class ATL_NO_VTABLE CIASVendorSpecificAttributeEditor :
  33. public CComObjectRootEx<CComSingleThreadModel>,
  34. public CComCoClass<CIASVendorSpecificAttributeEditor, &CLSID_IASVendorSpecificAttributeEditor>,
  35. public CIASAttributeEditor
  36. {
  37. public:
  38. CIASVendorSpecificAttributeEditor()
  39. {
  40. }
  41. DECLARE_NO_REGISTRY()
  42. BEGIN_COM_MAP(CIASVendorSpecificAttributeEditor)
  43. COM_INTERFACE_ENTRY(IIASAttributeEditor)
  44. COM_INTERFACE_ENTRY(IDispatch)
  45. END_COM_MAP()
  46. // IIASVendorSpecificAttributeEditor
  47. public:
  48. STDMETHOD(get_VSAFormat)(/*[out, retval]*/ long *pVal);
  49. STDMETHOD(put_VSAFormat)(/*[in]*/ long newVal);
  50. STDMETHOD(get_VSAType)(/*[out, retval]*/ long *pVal);
  51. STDMETHOD(put_VSAType)(/*[in]*/ long newVal);
  52. STDMETHOD(get_VendorID)(/*[out, retval]*/ long *pVal);
  53. STDMETHOD(put_VendorID)(/*[in]*/ long newVal);
  54. STDMETHOD(get_RFCCompliant)(/*[out, retval]*/ BOOL *pVal);
  55. STDMETHOD(put_RFCCompliant)(/*[in]*/ BOOL newVal);
  56. // IIASAttributeEditor overrides
  57. protected:
  58. STDMETHOD(get_VendorName)(/*[out, retval]*/ BSTR *pVal);
  59. STDMETHOD(put_VendorName)(/*[in]*/ BSTR newVal);
  60. STDMETHOD(ShowEditor)( /*[in, out]*/ BSTR *pReserved );
  61. STDMETHOD(put_ValueAsString)(/*[in]*/ BSTR newVal);
  62. STDMETHOD(get_ValueAsString)(/*[out, retval]*/ BSTR *pVal);
  63. STDMETHOD(SetAttributeValue)(VARIANT * pValue);
  64. private:
  65. // We store info about a vendor specific attribute which we
  66. // unpack from the variant passed in when SetAttributeValue
  67. // is called.
  68. DWORD m_dwVendorId;
  69. BOOL m_fNonRFC; // RFC compatible?
  70. DWORD m_dwVSAFormat;
  71. DWORD m_dwVSAType;
  72. CComBSTR m_bstrDisplayValue;
  73. CComBSTR m_bstrVendorName;
  74. // Utility function which takes m_pvarValue and unpacks
  75. // its values into the member variables above.
  76. STDMETHOD(UnpackVSA)();
  77. // Utility function which takes member variables above and
  78. // packs them into m_pvarValue;
  79. STDMETHOD(RepackVSA)();
  80. };
  81. #endif // _VENDOR_SPECIFIC_ATTRIBUTE_EDITOR_H_