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.

337 lines
7.7 KiB

  1. typedef struct _PropertyInfo
  2. {
  3. LPTSTR szPropertyName;
  4. BSTR bstrOID;
  5. BSTR bstrSyntax;
  6. long lMaxRange;
  7. long lMinRange;
  8. BOOL fMultiValued;
  9. DWORD dwFlags;
  10. DWORD dwInfoLevel;
  11. DWORD dwSyntaxId;
  12. } PROPERTYINFO, *PPROPERTYINFO, *LPPROPERTYINFO;
  13. typedef struct _ClassInfo
  14. {
  15. BSTR bstrName;
  16. const GUID *pCLSID;
  17. const GUID *pPrimaryInterfaceGUID;
  18. BSTR bstrOID;
  19. BOOL fAbstract;
  20. BSTR bstrMandatoryProperties;
  21. BSTR bstrOptionalProperties;
  22. BSTR bstrPossSuperiors;
  23. BSTR bstrContainment;
  24. BOOL fContainer;
  25. BSTR bstrHelpFileName;
  26. long lHelpFileContext;
  27. PROPERTYINFO *aPropertyInfo;
  28. DWORD cPropertyInfo;
  29. } CLASSINFO;
  30. typedef struct _SyntaxInfo
  31. {
  32. BSTR bstrName;
  33. long lOleAutoDataType;
  34. } SYNTAXINFO;
  35. extern DWORD g_cWinNTClasses;
  36. extern CLASSINFO g_aWinNTClasses[];
  37. extern DWORD g_cWinNTSyntax;
  38. extern SYNTAXINFO g_aWinNTSyntax[];
  39. HRESULT MakeVariantFromStringList(
  40. BSTR bstrList,
  41. VARIANT *pvVariant );
  42. class CWinNTSchema;
  43. class CWinNTSchema : INHERIT_TRACKING,
  44. public CCoreADsObject,
  45. public ISupportErrorInfo,
  46. public IADs,
  47. public IADsContainer,
  48. public INonDelegatingUnknown,
  49. public IADsExtension
  50. {
  51. public:
  52. /* IUnknown methods */
  53. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  54. STDMETHODIMP_(ULONG) AddRef(void);
  55. STDMETHODIMP_(ULONG) Release(void);
  56. // INonDelegatingUnknown methods
  57. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  58. const IID&,
  59. void **
  60. );
  61. DECLARE_NON_DELEGATING_REFCOUNTING
  62. /* Other methods */
  63. DECLARE_IDispatch_METHODS
  64. DECLARE_ISupportErrorInfo_METHODS
  65. DECLARE_IADs_METHODS
  66. DECLARE_IADsContainer_METHODS
  67. DECLARE_IADsExtension_METHODS
  68. /* Constructors, Destructors .... */
  69. CWinNTSchema::CWinNTSchema();
  70. CWinNTSchema::~CWinNTSchema();
  71. static HRESULT CWinNTSchema::CreateSchema(
  72. BSTR bstrParent,
  73. BSTR bstrName,
  74. DWORD dwObjectState,
  75. REFIID riid,
  76. CWinNTCredentials& Credentials,
  77. void **ppvObj );
  78. static HRESULT CWinNTSchema::AllocateSchemaObject(
  79. CWinNTSchema **ppSchema );
  80. STDMETHOD(ImplicitGetInfo)(void);
  81. protected:
  82. CAggregatorDispMgr FAR * _pDispMgr;
  83. VARIANT _vFilter;
  84. CWinNTCredentials _Credentials;
  85. };
  86. class CWinNTClass : INHERIT_TRACKING,
  87. public CCoreADsObject,
  88. public ISupportErrorInfo,
  89. public IADsClass,
  90. public INonDelegatingUnknown,
  91. public IADsExtension
  92. {
  93. public:
  94. /* IUnknown methods */
  95. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  96. STDMETHODIMP_(ULONG) AddRef(void);
  97. STDMETHODIMP_(ULONG) Release(void);
  98. // INonDelegatingUnknown methods
  99. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  100. const IID&,
  101. void **
  102. );
  103. DECLARE_NON_DELEGATING_REFCOUNTING
  104. /* Other methods */
  105. DECLARE_IDispatch_METHODS
  106. DECLARE_ISupportErrorInfo_METHODS
  107. DECLARE_IADs_METHODS
  108. DECLARE_IADsClass_METHODS
  109. DECLARE_IADsExtension_METHODS
  110. /* Constructors, Destructors, .... */
  111. CWinNTClass::CWinNTClass();
  112. CWinNTClass::~CWinNTClass();
  113. static HRESULT CWinNTClass::CreateClass(
  114. BSTR bstrParent,
  115. CLASSINFO *pClassInfo,
  116. DWORD dwObjectState,
  117. REFIID riid,
  118. CWinNTCredentials& Credentials,
  119. void **ppvObj );
  120. static HRESULT CWinNTClass::AllocateClassObject(
  121. CWinNTClass **ppClass );
  122. STDMETHOD(GetInfo)(THIS_ DWORD dwApiLevel, BOOL fExplicit) ;
  123. STDMETHOD(ImplicitGetInfo)(void);
  124. protected:
  125. CAggregatorDispMgr FAR * _pDispMgr;
  126. VARIANT _vFilter;
  127. DWORD _cPropertyInfo;
  128. PROPERTYINFO *_aPropertyInfo;
  129. /* Properties */
  130. BSTR _bstrCLSID;
  131. BSTR _bstrOID;
  132. BSTR _bstrPrimaryInterface;
  133. VARIANT_BOOL _fAbstract;
  134. VARIANT _vMandatoryProperties;
  135. VARIANT _vOptionalProperties;
  136. VARIANT _vPossSuperiors;
  137. VARIANT _vContainment;
  138. VARIANT_BOOL _fContainer;
  139. BSTR _bstrHelpFileName;
  140. long _lHelpFileContext;
  141. CWinNTCredentials _Credentials;
  142. };
  143. class CWinNTProperty : INHERIT_TRACKING,
  144. public CCoreADsObject,
  145. public ISupportErrorInfo,
  146. public IADsProperty,
  147. public INonDelegatingUnknown,
  148. public IADsExtension
  149. {
  150. public:
  151. /* IUnknown methods */
  152. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  153. STDMETHODIMP_(ULONG) AddRef(void);
  154. STDMETHODIMP_(ULONG) Release(void);
  155. // INonDelegatingUnknown methods
  156. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  157. const IID&,
  158. void **
  159. );
  160. DECLARE_NON_DELEGATING_REFCOUNTING
  161. /* Other methods */
  162. DECLARE_IDispatch_METHODS
  163. DECLARE_ISupportErrorInfo_METHODS
  164. DECLARE_IADs_METHODS
  165. DECLARE_IADsProperty_METHODS
  166. DECLARE_IADsExtension_METHODS
  167. /* Constructors, Destructors, ... */
  168. CWinNTProperty::CWinNTProperty();
  169. CWinNTProperty::~CWinNTProperty();
  170. static HRESULT CWinNTProperty::CreateProperty(
  171. BSTR bstrParent,
  172. PROPERTYINFO *pPropertyInfo,
  173. DWORD dwObjectState,
  174. REFIID riid,
  175. CWinNTCredentials& Credentials,
  176. void **ppvObj );
  177. static HRESULT CWinNTProperty::AllocatePropertyObject(
  178. CWinNTProperty **ppProperty );
  179. STDMETHOD(GetInfo)(THIS_ DWORD dwApiLevel, BOOL fExplicit) ;
  180. STDMETHOD(ImplicitGetInfo)(void);
  181. protected:
  182. CAggregatorDispMgr FAR * _pDispMgr;
  183. /* Properties */
  184. BSTR _bstrOID;
  185. BSTR _bstrSyntax;
  186. long _lMaxRange;
  187. long _lMinRange;
  188. VARIANT_BOOL _fMultiValued;
  189. CWinNTCredentials _Credentials;
  190. };
  191. class CWinNTSyntax : INHERIT_TRACKING,
  192. public CCoreADsObject,
  193. public ISupportErrorInfo,
  194. public IADsSyntax,
  195. public INonDelegatingUnknown,
  196. public IADsExtension
  197. {
  198. public:
  199. /* IUnknown methods */
  200. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  201. STDMETHODIMP_(ULONG) AddRef(void);
  202. STDMETHODIMP_(ULONG) Release(void);
  203. // INonDelegatingUnknown methods
  204. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  205. const IID&,
  206. void **
  207. );
  208. DECLARE_NON_DELEGATING_REFCOUNTING
  209. /* Other methods */
  210. DECLARE_IDispatch_METHODS
  211. DECLARE_ISupportErrorInfo_METHODS
  212. DECLARE_IADs_METHODS
  213. DECLARE_IADsSyntax_METHODS
  214. DECLARE_IADsExtension_METHODS
  215. /* Constructors, Destructors, ... */
  216. CWinNTSyntax::CWinNTSyntax();
  217. CWinNTSyntax::~CWinNTSyntax();
  218. static HRESULT CWinNTSyntax::CreateSyntax(
  219. BSTR bstrParent,
  220. SYNTAXINFO *pSyntaxInfo,
  221. DWORD dwObjectState,
  222. REFIID riid,
  223. CWinNTCredentials& Credentials,
  224. void **ppvObj );
  225. static HRESULT CWinNTSyntax::AllocateSyntaxObject(
  226. CWinNTSyntax **ppSyntax );
  227. STDMETHOD(GetInfo)(THIS_ DWORD dwApiLevel, BOOL fExplicit) ;
  228. STDMETHOD(ImplicitGetInfo)(void);
  229. protected:
  230. CAggregatorDispMgr FAR * _pDispMgr;
  231. /* Properties */
  232. long _lOleAutoDataType;
  233. CWinNTCredentials _Credentials;
  234. };