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.

202 lines
7.2 KiB

  1. #ifndef _OBJECTS_H_
  2. #define _OBJECTS_H_
  3. #include "schclss.h"
  4. #define MEMBERS IADsMembers
  5. class CMainDoc;
  6. class CClass;
  7. class CDeleteStatus;
  8. class COleDsObject: public CObject
  9. {
  10. public:
  11. COleDsObject( IUnknown* );
  12. COleDsObject( );
  13. ~COleDsObject( );
  14. public:
  15. BOOL HasChildren ( );
  16. CString GetClass ( );
  17. DWORD GetType ( );
  18. CString GetOleDsPath ( );
  19. CString GetItemName ( );
  20. CString* PtrGetItemName ( );
  21. CString GetSchemaPath ( );
  22. HRESULT SetInfo ( void );
  23. HRESULT GetInfo ( void );
  24. HRESULT SetInfoVB ( void );
  25. HRESULT GetInfoVB ( void );
  26. HRESULT SetInfoCPP ( void );
  27. HRESULT GetInfoCPP ( void );
  28. virtual HRESULT PutProperty ( int, CString&, long Code = ADS_PROPERTY_UPDATE );
  29. virtual HRESULT PutProperty ( CString&, CString& );
  30. virtual HRESULT GetProperty ( int, CString&, BOOL* pbIsDescriptor = NULL );
  31. virtual HRESULT GetProperty ( CString&, CString& );
  32. HRESULT PutProperty ( CString& strName, CString& strVal, BOOL bMultiValued, ADSTYPE eType );
  33. HRESULT GetProperty ( CString& strName, CString& strVal, BOOL bMultiValued, ADSTYPE eType );
  34. HRESULT PutPropertyVB ( int, CString&, long Code = ADS_PROPERTY_UPDATE );
  35. HRESULT PutPropertyVB ( CString&, CString& );
  36. HRESULT GetPropertyVB ( int, CString&, BOOL* pbIsDescriptor = NULL );
  37. HRESULT GetPropertyVB ( CString&, CString& );
  38. HRESULT PutPropertyCPP ( int, CString&, long Code = ADS_PROPERTY_UPDATE );
  39. HRESULT PutPropertyCPP ( CString&, CString& );
  40. HRESULT GetPropertyCPP ( int, CString&, BOOL* pbIsDescriptor = NULL );
  41. HRESULT GetPropertyCPP ( CString&, CString& );
  42. virtual void SetDocument ( CMainDoc* );
  43. BOOL CreateTheObject ( );
  44. BOOL HasMandatoryProperties( );
  45. void UseSchemaInformation ( BOOL );
  46. COleDsObject* GetParent ( );
  47. void SetParent ( COleDsObject* );
  48. virtual BOOL AddItemSuported ( );
  49. virtual BOOL DeleteItemSuported ( );
  50. virtual BOOL MoveItemSupported ( );
  51. virtual BOOL CopyItemSupported ( );
  52. virtual HRESULT AddItem ( );
  53. virtual HRESULT DeleteItem ( );
  54. virtual HRESULT DeleteItem ( COleDsObject* );
  55. virtual HRESULT MoveItem ( );
  56. virtual HRESULT CopyItem ( );
  57. virtual CString GetDeleteName ( );
  58. virtual DWORD GetChildren( DWORD* pTokens, DWORD dwMaxChildren,
  59. CDialog* pQueryStatus,
  60. BOOL* pFilters, DWORD dwFilters );
  61. HRESULT CallMethod ( int nMethod );
  62. //HRESULT CallMethod ( CString& strFuncSet, int nMethod );
  63. virtual DWORD GetChildren( IADsContainer* );
  64. virtual DWORD GetChildren( IADsCollection* );
  65. virtual DWORD GetChildren( MEMBERS* );
  66. virtual HRESULT ReleaseIfNotTransient( void );
  67. void AddNamesFromEnum ( IUnknown* pIEnum );
  68. HRESULT ContainerAddItem ( void );
  69. HRESULT ContainerDeleteItem ( COleDsObject* );
  70. HRESULT ContainerMoveItem ( void );
  71. HRESULT ContainerCopyItem ( );
  72. virtual HRESULT GetInterface ( IUnknown** );
  73. /*****************************************/
  74. virtual int GetPropertyCount ( );
  75. virtual CString VarToDisplayString ( int, VARIANT&, BOOL );
  76. virtual BOOL DisplayStringToDispParams ( int, CString&, DISPPARAMS&, BOOL );
  77. virtual BOOL SupportContainer( void );
  78. virtual CString GetAttribute( CLASSATTR );
  79. virtual HRESULT PutAttribute( CLASSATTR, CString& );
  80. virtual CString GetAttribute( int, PROPATTR );
  81. virtual HRESULT PutAttribute( int, PROPATTR, CString& );
  82. virtual CString GetAttribute( int, METHODATTR );
  83. virtual HRESULT PutAttribute( int, METHODATTR, CString& );
  84. protected:
  85. HRESULT GetIDispatchForFuncSet( int, IDispatch** );
  86. HRESULT CopyAttributeValue ( ADS_ATTR_INFO* , int nAttribute = -1 );
  87. HRESULT CreateAttributeValue ( ADS_ATTR_INFO* , int nAttribute = -1 );
  88. void CreateClassInfo ( void );
  89. HRESULT GetDirtyAttributes ( PADS_ATTR_INFO* ppAttrDef, DWORD* pdwCount );
  90. void FreeDirtyAttributes ( PADS_ATTR_INFO pAttrDef, DWORD dwCount );
  91. HRESULT CreatePropertiesList ( );
  92. HRESULT ClearPropertiesList ( );
  93. HRESULT GetPropertyFromList ( int nProp, CString& strPropValue );
  94. BOOL IsClassObject ( );
  95. BOOL IsSecurityDescriptor ( VARIANT& rValue, BOOL bUseGetEx );
  96. HRESULT PurgeObject ( IADsContainer* pParent,
  97. IUnknown* pIUnknown,
  98. LPWSTR pszPrefix = NULL );
  99. protected:
  100. IUnknown* m_pIUnk;
  101. CString m_strOleDsPath;
  102. CString m_strClassName;
  103. CString m_strItemName;
  104. CString m_strSchemaPath;
  105. DWORD m_dwType;
  106. BOOL m_bHasChildren;
  107. BOOL m_bUseSchemaInformation;
  108. BOOL m_bSupportAdd;
  109. BOOL m_bSupportDelete;
  110. BOOL m_bSupportMove;
  111. BOOL m_bSupportCopy;
  112. // members for enumerating children
  113. DWORD* m_pTokens;
  114. DWORD m_dwMaxCount;
  115. DWORD m_dwCount;
  116. DWORD m_dwFilters;
  117. BOOL* m_pFilters;
  118. CDialog* m_pQueryStatus;
  119. BOOL m_bAbort;
  120. CClass* m_pClass;
  121. COleDsObject* m_pParent;
  122. CMainDoc* m_pDoc;
  123. CDWordArray* m_pChildren;
  124. CDeleteStatus* m_pDeleteStatus;
  125. // operations information;
  126. int m_nOperationsCount;
  127. CStringArray* m_pOperationNames;
  128. REFIID m_refOperations;
  129. // extended syntax values
  130. CString* m_pCachedValues;
  131. BOOL* m_pfReadValues;
  132. BOOL* m_pfDirty;
  133. DWORD* m_pdwUpdateType;
  134. // IPropertyList stuff
  135. int m_nPropertiesCount;
  136. IUnknown** m_ppPropertiesEntries;
  137. };
  138. #include "cdomain.h"
  139. #include "cgeneric.h"
  140. #include "ccomp.h"
  141. #include "cuser.h"
  142. #include "cgroup.h"
  143. #include "cservice.h"
  144. #include "cfserv.h"
  145. #include "cpqueue.h"
  146. #include "cpjob.h"
  147. #include "cpdevice.h"
  148. #include "cfshare.h"
  149. #include "csession.h"
  150. #include "cresourc.h"
  151. #include "cnmsp.h"
  152. #include "cnmsps.h"
  153. #endif