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.

263 lines
5.8 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 2000.
  5. //
  6. // File: cumiobj.hxx
  7. //
  8. // Contents: Header file for CUmiObject.
  9. //
  10. // History: 03-06-00 SivaramR Created.
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef __CUMIOBJ_H__
  14. #define __CUMIOBJ_H__
  15. #include "iadsp.h"
  16. class CUmiPropList;
  17. class CCoreADsObject;
  18. class CUmiObject : INHERIT_TRACKING,
  19. public IUmiContainer,
  20. public IUmiCustomInterfaceFactory,
  21. public IUmiADSIPrivate
  22. {
  23. public:
  24. CUmiObject(void);
  25. ~CUmiObject(void);
  26. DECLARE_STD_REFCOUNTING
  27. STDMETHODIMP QueryInterface(
  28. REFIID iid,
  29. LPVOID *ppInterface
  30. );
  31. HRESULT FInit(
  32. CWinNTCredentials& Credentials,
  33. PROPERTYINFO *pSchema,
  34. DWORD dwSchemaSize,
  35. CPropertyCache *pPropertyCache,
  36. IUnknown *pUnkOuter,
  37. CADsExtMgr *pExtMgr,
  38. CCoreADsObject *pCoreObj,
  39. CLASSINFO *pClassInfo
  40. );
  41. STDMETHODIMP Clone(
  42. ULONG uFlags,
  43. REFIID riid,
  44. LPVOID *pCopy
  45. );
  46. STDMETHODIMP Refresh(
  47. ULONG uFlags,
  48. ULONG uNameCount,
  49. LPWSTR *pszNames
  50. );
  51. STDMETHODIMP Commit(ULONG uFlags);
  52. STDMETHODIMP Put(
  53. LPCWSTR pszName,
  54. ULONG uFlags,
  55. UMI_PROPERTY_VALUES *pProp
  56. );
  57. STDMETHODIMP Get(
  58. LPCWSTR pszName,
  59. ULONG uFlags,
  60. UMI_PROPERTY_VALUES **ppProp
  61. );
  62. STDMETHODIMP GetAs(
  63. LPCWSTR pszName,
  64. ULONG uFlags,
  65. ULONG uCoercionType,
  66. UMI_PROPERTY_VALUES **ppProp
  67. );
  68. STDMETHODIMP FreeMemory(
  69. ULONG uReserved,
  70. LPVOID pMem
  71. );
  72. STDMETHODIMP GetAt(
  73. LPCWSTR pszName,
  74. ULONG uFlags,
  75. ULONG uBufferLength,
  76. LPVOID pExistingMem
  77. );
  78. STDMETHODIMP GetProps(
  79. LPCWSTR *pszNames,
  80. ULONG uNameCount,
  81. ULONG uFlags,
  82. UMI_PROPERTY_VALUES **pProps
  83. );
  84. STDMETHODIMP PutProps(
  85. LPCWSTR *pszNames,
  86. ULONG uNameCount,
  87. ULONG uFlags,
  88. UMI_PROPERTY_VALUES *pProps
  89. );
  90. STDMETHODIMP PutFrom(
  91. LPCWSTR pszName,
  92. ULONG uFlags,
  93. ULONG uBufferLength,
  94. LPVOID pExistingMem
  95. );
  96. STDMETHODIMP Delete(
  97. LPCWSTR pszName,
  98. ULONG uFlags
  99. );
  100. STDMETHODIMP GetLastStatus(
  101. ULONG uFlags,
  102. ULONG *puSpecificStatus,
  103. REFIID riid,
  104. LPVOID *pStatusObj
  105. );
  106. STDMETHODIMP GetInterfacePropList(
  107. ULONG uFlags,
  108. IUmiPropList **pPropList
  109. );
  110. STDMETHODIMP Open(
  111. IUmiURL *pURL,
  112. ULONG uFlags,
  113. REFIID TargetIID,
  114. LPVOID *ppInterface
  115. );
  116. STDMETHODIMP PutObject(
  117. ULONG uFlags,
  118. REFIID TargetIID,
  119. LPVOID pInterface
  120. );
  121. STDMETHODIMP DeleteObject(
  122. IUmiURL *pURL,
  123. ULONG uFlags
  124. );
  125. STDMETHODIMP Create(
  126. IUmiURL *pURL,
  127. ULONG uFlags,
  128. IUmiObject **pNewObj
  129. );
  130. STDMETHODIMP Move(
  131. ULONG uFlags,
  132. IUmiURL *pOldURL,
  133. IUmiURL *pNewURL
  134. );
  135. STDMETHODIMP CreateEnum(
  136. IUmiURL *pszEnumContext,
  137. ULONG uFlags,
  138. REFIID TargetIID,
  139. LPVOID *ppInterface
  140. );
  141. STDMETHODIMP ExecQuery(
  142. IUmiQuery *pQuery,
  143. ULONG uFlags,
  144. REFIID TargetIID,
  145. LPVOID *ppInterface
  146. );
  147. STDMETHODIMP GetCLSIDForIID(
  148. REFIID riid,
  149. long lFlags,
  150. CLSID *pCLSID
  151. );
  152. STDMETHODIMP GetObjectByCLSID(
  153. CLSID clsid,
  154. IUnknown *pUnkOuter,
  155. DWORD dwClsContext,
  156. REFIID riid,
  157. long lFlags,
  158. void **ppInterface
  159. );
  160. STDMETHODIMP GetCLSIDForNames(
  161. LPOLESTR * rgszNames,
  162. UINT cNames,
  163. LCID lcid,
  164. DISPID * rgDispId,
  165. long lFlags,
  166. CLSID *pCLSID
  167. );
  168. STDMETHODIMP GetContainer(void **ppContainer);
  169. STDMETHODIMP GetCoreObject(void **ppCoreObj);
  170. STDMETHODIMP CopyTo(
  171. ULONG uFlags,
  172. IUmiURL *pURL,
  173. REFIID riid,
  174. LPVOID *pCopy
  175. );
  176. STDMETHODIMP_(void) SetUmiFlag(void)
  177. {
  178. m_pCreds->SetUmiFlag();
  179. }
  180. STDMETHODIMP_(void) ResetUmiFlag(void)
  181. {
  182. m_pCreds->ResetUmiFlag();
  183. }
  184. private:
  185. IUmiPropList *m_pIntfProps;
  186. CUmiPropList *m_pObjProps;
  187. IUnknown *m_pUnkInner;
  188. IADs *m_pIADs;
  189. IADsContainer *m_pIADsContainer;
  190. ULONG m_ulErrorStatus;
  191. CCoreADsObject *m_pCoreObj;
  192. CADsExtMgr *m_pExtMgr;
  193. BOOL m_fOuterUnkSet;
  194. CPropertyCache *m_pPropCache;
  195. BOOL m_fRefreshDone;
  196. CWinNTCredentials* m_pCreds;
  197. void SetLastStatus(ULONG ulStatus);
  198. BOOL IsRelativePath(IUmiURL *pURL);
  199. HRESULT GetClassAndPath(
  200. LPWSTR pszPath,
  201. LPWSTR *ppszClass,
  202. LPWSTR *ppszPath
  203. );
  204. HRESULT CreateObjectProperties(
  205. PPROPERTYINFO pSchema,
  206. DWORD dwSchemaSize,
  207. IUnknown *pUnkInner,
  208. CCoreADsObject *pCoreObj
  209. );
  210. HRESULT CopyPropCache(
  211. IUmiObject *pDest,
  212. IUmiObject *pSrc
  213. );
  214. HRESULT CheckClasses(
  215. DWORD dwNumComponents,
  216. LPWSTR *ppszClasses
  217. );
  218. };
  219. #endif //__CUMIOBJ_H__