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.

58 lines
1.2 KiB

  1. #ifndef __ATTRIBUTEEDITORIMPL_H
  2. #define __ATTRIBUTEEDITORIMPL_H
  3. #include "editui.h"
  4. class /*ATL_NO_VTABLE*/ CAttributeEditor :
  5. public CComObjectRootEx<CComMultiThreadModel>,
  6. public IDsAttributeEditor,
  7. public CComCoClass<CAttributeEditor, &CLSID_DsAttributeEditor>
  8. {
  9. public:
  10. CAttributeEditor() : m_pHolder(0)
  11. {
  12. m_szClass = _T("");
  13. m_pEditor = NULL;
  14. }
  15. ~CAttributeEditor()
  16. {
  17. if (m_pEditor != NULL)
  18. {
  19. delete m_pEditor;
  20. }
  21. if (m_BindingInfo.lpszProviderServer != NULL)
  22. {
  23. delete[] m_BindingInfo.lpszProviderServer;
  24. }
  25. }
  26. DECLARE_REGISTRY_CLSID();
  27. BEGIN_COM_MAP(CAttributeEditor)
  28. COM_INTERFACE_ENTRY(IDsAttributeEditor)
  29. END_COM_MAP()
  30. public:
  31. //
  32. // IDsAttributeEditor interface
  33. //
  34. STDMETHOD(Initialize)(
  35. IADs* pADsObj,
  36. LPDS_ATTREDITOR_BINDINGINFO pBindingInfo,
  37. CADSIEditPropertyPageHolder* pHolder);
  38. STDMETHOD(CreateModal)();
  39. STDMETHOD(GetPage)(HPROPSHEETPAGE* phPropSheetPage);
  40. private:
  41. CComPtr<IADs> m_spIADs;
  42. CString m_szClass;
  43. CAttributeEditorPropertyPage* m_pEditor;
  44. DS_ATTREDITOR_BINDINGINFO m_BindingInfo;
  45. CADSIEditPropertyPageHolder* m_pHolder;
  46. };
  47. #endif //__ATTRIBUTEEDITORIMPL_H