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.

140 lines
2.7 KiB

  1. //
  2. // forward declarations
  3. //
  4. //
  5. // Definition for struct that is used to pass in static interface
  6. // properties related information. The data will normally be static.
  7. //
  8. typedef struct _intfPropData {
  9. LPCWSTR pszPropertyName; // Name of interface property.
  10. ULONG ulOpCode; // operation code = readable/writable.
  11. ULONG ulDataType; // Umi Data Type.
  12. BOOL fMultiValued; // TRUE if multivalued.
  13. UMI_VALUE umiVal; // Default Value.
  14. } INTF_PROP_DATA, *PINTF_PROP_DATA;
  15. #define GETINFO_FLAG_IMPLICIT 0
  16. #define GETINFO_FLAG_EXPLICIT 1
  17. #define GETINFO_FLAG_IMPLICIT_AS_NEEDED 2
  18. class CPropertyCache;
  19. class CADsExtMgr;
  20. class CCoreADsObject
  21. {
  22. public:
  23. CCoreADsObject::CCoreADsObject();
  24. CCoreADsObject::~CCoreADsObject();
  25. HRESULT
  26. get_CoreName(BSTR * retval);
  27. HRESULT
  28. get_CoreADsPath(BSTR * retval);
  29. HRESULT
  30. get_CoreParent(BSTR * retval);
  31. HRESULT
  32. get_CoreSchema(BSTR * retval);
  33. HRESULT
  34. get_CoreADsClass(BSTR * retval);
  35. HRESULT
  36. get_CoreGUID(BSTR * retval);
  37. DWORD
  38. CCoreADsObject::GetObjectState()
  39. {
  40. return(_dwObjectState);
  41. }
  42. void
  43. CCoreADsObject::SetObjectState(DWORD dwObjectState)
  44. {
  45. _dwObjectState = dwObjectState;
  46. }
  47. HRESULT
  48. InitializeCoreObject(
  49. BSTR Parent,
  50. BSTR Name,
  51. BSTR SchemaClass,
  52. REFCLSID rclsid,
  53. DWORD dwObjectState
  54. );
  55. STDMETHOD(GetInfo)(THIS_ DWORD dwFlags);
  56. STDMETHOD(GetInfo)(
  57. LPWSTR szPropertyName,
  58. DWORD dwSyntaxId,
  59. BOOL fExplicit
  60. );
  61. //
  62. // Umi support.
  63. //
  64. HRESULT
  65. CCoreADsObject::InitUmiObject(
  66. INTF_PROP_DATA intfProps[],
  67. CPropertyCache * pPropertyCache,
  68. IADs *pIADs,
  69. IUnknown *pUnkInner,
  70. REFIID riid,
  71. LPVOID *ppvObj,
  72. CCredentials *pCreds,
  73. DWORD dwPort = (DWORD) -1,
  74. LPWSTR pszServerName = NULL,
  75. LPWSTR pszLdapDn = NULL,
  76. PADSLDP pLdapHandle = NULL,
  77. CADsExtMgr *pExtMgr = NULL
  78. );
  79. IUnknown *
  80. CCoreADsObject::GetOuterUnknown()
  81. {
  82. return(_pUnkOuter);
  83. }
  84. void
  85. CCoreADsObject::SetOuterUnknown(IUnknown *pUnkOuter)
  86. {
  87. _pUnkOuter = pUnkOuter;
  88. }
  89. protected:
  90. DWORD _dwObjectState;
  91. BSTR _Name;
  92. BSTR _ADsPath;
  93. BSTR _Parent;
  94. BSTR _ADsClass;
  95. BSTR _ADsGuid;
  96. BSTR _SchemaClass;
  97. IUnknown *_pUnkOuter;
  98. };
  99. #define ADS_OBJECT_BOUND 1
  100. #define ADS_OBJECT_UNBOUND 2