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.

159 lines
5.6 KiB

  1. #ifndef __ATTRINTERFACE_H
  2. #define __ATTRINTERFACE_H
  3. // {C7436F12-A27F-4cab-AACA-2BD27ED1B773}
  4. DEFINE_GUID(CLSID_DsAttributeEditor,
  5. 0xc7436f12, 0xa27f, 0x4cab, 0xaa, 0xca, 0x2b, 0xd2, 0x7e, 0xd1, 0xb7, 0x73);
  6. //
  7. // Interface GUIDs
  8. //
  9. // {A9948091-69FF-4c00-BE92-925D42E0AD39}
  10. DEFINE_GUID(IID_IDsAttributeEditor,
  11. 0xa9948091, 0x69ff, 0x4c00, 0xbe, 0x92, 0x92, 0x5d, 0x42, 0xe0, 0xad, 0x39);
  12. // {A9948091-69FF-4c00-BE93-925D42E0AD39}
  13. DEFINE_GUID(IID_IDsAttributeEditorExt,
  14. 0xa9948091, 0x69ff, 0x4c00, 0xbe, 0x93, 0x92, 0x5d, 0x42, 0xe0, 0xad, 0x39);
  15. // {5828DF66-95FB-4afa-8F8E-EA0B7D302FB5}
  16. DEFINE_GUID(IID_IDsBindingInfo,
  17. 0x5828df66, 0x95fb, 0x4afa, 0x8f, 0x8e, 0xea, 0xb, 0x7d, 0x30, 0x2f, 0xb5);
  18. // ----------------------------------------------------------------------------
  19. //
  20. // Interface: IDsBindingInfo
  21. //
  22. // Implemented by any client needing to invoke the attribute editor UI
  23. //
  24. // Used by: the attribute editor UI
  25. //
  26. #undef INTERFACE
  27. #define INTERFACE IDsBindingInfo
  28. interface __declspec(uuid("{5828DF66-95FB-4afa-8F8E-EA0B7D302FB5}")) IDsBindingInfo : public IUnknown
  29. {
  30. // *** IUnknown methods ***
  31. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  32. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  33. STDMETHOD_(ULONG,Release)(THIS) PURE;
  34. // *** IDsBindingInfo methods ***
  35. STDMETHOD(DoBind)(THIS_ /*IN*/ LPCWSTR lpszPathName,
  36. /*IN*/ DWORD dwReserved,
  37. /*IN*/ REFIID riid,
  38. /*IN*/ void FAR * FAR * ppObject) PURE;
  39. };
  40. // ----------------------------------------------------------------------------
  41. //
  42. // Interface: IDsAttributeEditor
  43. //
  44. // Implemented by the object (implemented by the system) CLSID_DsAttributeEditor
  45. //
  46. // Used by: any client needing to invoke the attribute editor UI
  47. //
  48. //
  49. // Function definition for the binding callback function
  50. //
  51. typedef HRESULT (*LPBINDINGFUNC)(/*IN*/ LPCWSTR lpszPathName,
  52. /*IN*/ DWORD dwReserved,
  53. /*IN*/ REFIID riid,
  54. /*IN*/ void FAR * FAR * ppObject,
  55. /*IN*/ LPARAM lParam);
  56. //
  57. // struct passed to IDsAttributeEditor::Initialize()
  58. //
  59. // it contains information regarding the binding function
  60. //
  61. typedef struct
  62. {
  63. DWORD dwSize; // size of struct, for versioning
  64. DWORD dwFlags; // flags defined below
  65. LPBINDINGFUNC lpfnBind; // the callback function used to bind to Active Directory
  66. LPARAM lParam; // an optional property that is passed back to lpfnBind
  67. LPWSTR lpszProviderServer; // the provider and server that will be used to perform binds
  68. // in the form <Provider>://<server>/
  69. } DS_ATTREDITOR_BINDINGINFO, * LPDS_ATTREDITOR_BINDINGINFO;
  70. //
  71. // Forward declaration
  72. //
  73. class CADSIEditPropertyPageHolder;
  74. //
  75. // Flags used in the DS_ATTREDITOR_BINDINGINFO struct above
  76. //
  77. #define DSATTR_EDITOR_ROOTDSE 0x00000001 // Connection is being made to the RootDSE (don't do schema checks)
  78. #undef INTERFACE
  79. #define INTERFACE IDsAttributeEditor
  80. interface __declspec(uuid("{A9948091-69FF-4c00-BE92-925D42E0AD39}")) IDsAttributeEditor : public IUnknown
  81. {
  82. // *** IUnknown methods ***
  83. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  84. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  85. STDMETHOD_(ULONG,Release)(THIS) PURE;
  86. // *** IDsAttributeEditor methods ***
  87. STDMETHOD(Initialize)(THIS_ /*IN*/ IADs* pADsObj,
  88. /*IN*/ LPDS_ATTREDITOR_BINDINGINFO pBindingInfo,
  89. /*IN*/ CADSIEditPropertyPageHolder* pHolder) PURE;
  90. STDMETHOD(CreateModal)() PURE;
  91. STDMETHOD(GetPage)(THIS_ /*OUT*/ HPROPSHEETPAGE* phPropSheetPage) PURE;
  92. };
  93. // ----------------------------------------------------------------------------
  94. //
  95. // Interface: IDsAttributeEditorExt
  96. //
  97. // Implemented by any client needing to provide a custom editor for any DS attribute or syntax
  98. //
  99. // Used by: the system to provide editing capabilities for attributes
  100. //
  101. //
  102. // struct passed to IDsAttributeEditorExt::Initialize()
  103. //
  104. // it contains information regarding the attribute type and values
  105. //
  106. typedef struct
  107. {
  108. DWORD dwSize; // size of struct, for versioning
  109. LPWSTR lpszClass; // pointer to a wide character string containing the class name
  110. LPWSTR lpszAttribute; // pointer to a wide character string containing the attribute name
  111. ADSTYPE adsType; // the ADSTYPE of the attribute
  112. PADSVALUE pADsValue; // pointer to the ADSVALUE struct that holds the current values
  113. DWORD dwNumValues; // the number of values pointed to by pADsValue
  114. BOOL bMultivalued; // TRUE if the attribute is multivalued, FALSE if it is not.
  115. LPBINDINGFUNC lpfnBind; // the callback function used to bind to Active Directory
  116. LPARAM lParam; // an optional property that is passed back to lpfnBind
  117. } DS_ATTRIBUTE_EDITORINFO, * LPDS_ATTRIBUTE_EDITORINFO;
  118. #undef INTERFACE
  119. #define INTERFACE IDsAttributeEditorExt
  120. interface __declspec(uuid("{A9948091-69FF-4c00-BE93-925D42E0AD39}")) IDsAttributeEditorExt : public IUnknown
  121. {
  122. // *** IUnknown methods ***
  123. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  124. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  125. STDMETHOD_(ULONG,Release)(THIS) PURE;
  126. // *** IDsAttributeEditor methods ***
  127. STDMETHOD(Initialize)(THIS_ /*IN*/ LPDS_ATTRIBUTE_EDITORINFO) PURE;
  128. STDMETHOD(GetNewValue)(THIS_ /*OUT*/ PADSVALUE* ppADsValue,
  129. /*OUT*/ DWORD* dwNumValues) PURE;
  130. STDMETHOD(CreateModal)(THIS_ ) PURE;
  131. };
  132. #endif //__ATTRINTERFACE_H