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.

209 lines
4.3 KiB

  1. /*===================================================================
  2. Microsoft IIS
  3. Microsoft Confidential.
  4. Copyright 1997 Microsoft Corporation. All Rights Reserved.
  5. Component: WAMREG
  6. File: WamAdm.h
  7. Declaration of the CWamAdmin
  8. Owner: LeiJin
  9. Note:
  10. WamAdm header file
  11. ===================================================================*/
  12. #ifndef __WAMADM_H_
  13. #define __WAMADM_H_
  14. #include "admex.h"
  15. #include "common.h"
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CWamAdmin
  18. class CWamAdmin :
  19. public IWamAdmin2,
  20. public IMSAdminReplication
  21. #ifdef _IIS_6_0
  22. , public IIISApplicationAdmin
  23. #endif // _IIS_6_0
  24. {
  25. public:
  26. CWamAdmin();
  27. ~CWamAdmin();
  28. public:
  29. STDMETHOD(QueryInterface)(REFIID riid, void ** ppv);
  30. STDMETHOD_(ULONG, AddRef)();
  31. STDMETHOD_(ULONG, Release)();
  32. //
  33. // IWamAdmin
  34. //
  35. STDMETHOD(AppRecover)
  36. (
  37. /*[in, unique, string]*/ LPCWSTR szMDPath,
  38. /*[in]*/ BOOL fRecursive
  39. );
  40. STDMETHOD(AppDeleteRecoverable)
  41. (/*[in, unique, string]*/ LPCWSTR szMDPath,
  42. /*[in]*/ BOOL fRecursive
  43. );
  44. STDMETHOD(AppGetStatus)
  45. (/*[in, unique, string]*/ LPCWSTR szMDPath,
  46. /*[out]*/ DWORD *pdwAppStatus
  47. );
  48. STDMETHOD(AppUnLoad)
  49. (/*[in, unique, string]*/ LPCWSTR szMDPath,
  50. /*[in]*/ BOOL fRecursive
  51. );
  52. STDMETHOD(AppDelete)
  53. (/*[in, unique, string]*/ LPCWSTR szMDPath,
  54. /*[in]*/ BOOL fRecursive
  55. );
  56. STDMETHOD(AppCreate)
  57. (/*[in, unique, string]*/ LPCWSTR szMDPath,
  58. /*[in]*/ BOOL fInProc
  59. );
  60. //
  61. // IWamAdmin2
  62. //
  63. STDMETHOD(AppCreate2)
  64. (/*[in, unique, string]*/ LPCWSTR szMDPath,
  65. /*[in]*/ DWORD dwAppMode
  66. );
  67. //
  68. //IMSAdminReplication
  69. //These interfaces are defined in admex.h, as part of Admin Extension.
  70. //
  71. STDMETHOD(GetSignature)
  72. (
  73. /* [in] */ DWORD dwBufferSize,
  74. /* [size_is][out] */ unsigned char __RPC_FAR *pbBuffer,
  75. /* [out */ DWORD __RPC_FAR *pdwMDRequiredBufferSize
  76. );
  77. STDMETHOD(Propagate)
  78. (
  79. /* [in] */ DWORD dwBufferSize,
  80. /* [size_is][in] */ unsigned char __RPC_FAR *pszBuffer
  81. );
  82. STDMETHOD(Propagate2)
  83. (
  84. /* [in] */ DWORD dwBufferSize,
  85. /* [size_is][in] */ unsigned char __RPC_FAR *pszBuffer,
  86. /* [in] */ DWORD dwSignatureMismatch
  87. );
  88. STDMETHOD(Serialize)
  89. (
  90. /* [in] */ DWORD dwBufferSize,
  91. /* [size_is][out] */ unsigned char __RPC_FAR *pbBuffer,
  92. /* [out] */ DWORD __RPC_FAR *pdwMDRequiredBufferSize
  93. );
  94. STDMETHOD(DeSerialize)
  95. (
  96. /* [in] */ DWORD dwBufferSize,
  97. /* [size_is][in] */ unsigned char __RPC_FAR *pbBuffer
  98. );
  99. #ifdef _IIS_6_0
  100. //
  101. // IIISApplicationAdmin interface
  102. //
  103. STDMETHOD(CreateApplication)
  104. (
  105. LPCWSTR szMDPath,
  106. DWORD dwAppMode,
  107. LPCWSTR szAppPoolId,
  108. BOOL fCreatePool
  109. );
  110. STDMETHOD(DeleteApplication)
  111. (
  112. LPCWSTR szMDPath,
  113. BOOL fRecursive
  114. );
  115. STDMETHOD(CreateApplicationPool)
  116. (
  117. LPCWSTR szMDPath
  118. );
  119. STDMETHOD(DeleteApplicationPool)
  120. (
  121. LPCWSTR szMDPath
  122. );
  123. STDMETHOD(EnumerateApplicationsInPool)
  124. (
  125. LPCWSTR szMDPath,
  126. BSTR* pbstrBuffer
  127. );
  128. STDMETHOD(RecycleApplicationPool)
  129. (
  130. LPCWSTR szMDPath
  131. );
  132. STDMETHOD(GetProcessMode)
  133. (
  134. DWORD * pdwMode
  135. );
  136. #endif // _IIS_6_0
  137. private:
  138. HRESULT PrivateDeleteApplication
  139. (
  140. LPCWSTR szMDPath,
  141. BOOL fRecursive,
  142. BOOL fRecoverable,
  143. BOOL fRemoveAppPool
  144. );
  145. STDMETHOD(FormatMetabasePath)
  146. (
  147. /* [in] */ LPCWSTR pwszMetabasePathIn,
  148. /* [out] */ LPWSTR *ppwszMetabasePathOut
  149. );
  150. long m_cRef;
  151. };
  152. class CWamAdminFactory:
  153. public IClassFactory
  154. {
  155. public:
  156. CWamAdminFactory();
  157. ~CWamAdminFactory();
  158. STDMETHOD(QueryInterface)(REFIID riid, void ** ppv);
  159. STDMETHOD_(ULONG, AddRef)();
  160. STDMETHOD_(ULONG, Release)();
  161. STDMETHOD(CreateInstance)(IUnknown * pUnknownOuter, REFIID riid, void ** ppv);
  162. STDMETHOD(LockServer)(BOOL bLock);
  163. private:
  164. long m_cRef;
  165. };
  166. #endif //__WAMADM_H_