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.

194 lines
4.5 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 2001
  5. //
  6. // File: cwebservice.hxx
  7. //
  8. // Contents: CIISWebService object
  9. //
  10. // History: 01-15-2001 BrentMid Created.
  11. //
  12. //----------------------------------------------------------------------------
  13. class CIISWebService;
  14. class CIISWebService : INHERIT_TRACKING,
  15. public IISWebService,
  16. public IPrivateUnknown,
  17. public IPrivateDispatch,
  18. public IADsExtension,
  19. public INonDelegatingUnknown
  20. {
  21. public:
  22. /* IUnknown methods */
  23. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  24. DECLARE_DELEGATING_REFCOUNTING
  25. //
  26. // INonDelegatingUnkown methods declaration for NG_QI, definition for
  27. // NG_AddRef adn NG_Release.
  28. //
  29. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  30. const IID&,
  31. void **
  32. );
  33. DECLARE_NON_DELEGATING_REFCOUNTING
  34. DECLARE_IDispatch_METHODS
  35. DECLARE_IPrivateUnknown_METHODS
  36. DECLARE_IPrivateDispatch_METHODS
  37. STDMETHOD(Operate)(
  38. THIS_
  39. DWORD dwCode,
  40. VARIANT varUserName,
  41. VARIANT varPassword,
  42. VARIANT varReserved
  43. );
  44. STDMETHOD(PrivateGetIDsOfNames)(
  45. THIS_
  46. REFIID riid,
  47. OLECHAR FAR* FAR* rgszNames,
  48. unsigned int cNames,
  49. LCID lcid,
  50. DISPID FAR* rgdispid) ;
  51. STDMETHOD(PrivateInvoke)(
  52. THIS_
  53. DISPID dispidMember,
  54. REFIID riid,
  55. LCID lcid,
  56. WORD wFlags,
  57. DISPPARAMS FAR* pdispparams,
  58. VARIANT FAR* pvarResult,
  59. EXCEPINFO FAR* pexcepinfo,
  60. unsigned int FAR* puArgErr
  61. ) ;
  62. DECLARE_IADs_METHODS
  63. CIISWebService::CIISWebService();
  64. CIISWebService::~CIISWebService();
  65. static
  66. HRESULT
  67. CIISWebService::CreateWebService(
  68. IUnknown *pUnkOuter,
  69. REFIID riid,
  70. void **ppvObj
  71. );
  72. static
  73. HRESULT
  74. CIISWebService::AllocateWebServiceObject(
  75. IUnknown *pUnkOuter,
  76. CCredentials& Credentials,
  77. CIISWebService ** ppWebService
  78. );
  79. HRESULT
  80. CIISWebService::InitializeWebServiceObject(
  81. LPWSTR pszServerName,
  82. LPWSTR pszPath
  83. );
  84. STDMETHOD (GetCurrentMode)(
  85. VARIANT FAR* pvServerMode
  86. );
  87. STDMETHOD (CreateNewSite)(
  88. BSTR bstrServerComment,
  89. VARIANT* pvServerBindings,
  90. BSTR bstrRootVDirPath,
  91. VARIANT vServerID,
  92. VARIANT* pvActualID
  93. );
  94. STDMETHOD (EnableApplication)(
  95. BSTR bstrAppName
  96. );
  97. STDMETHOD (RemoveApplication)(
  98. BSTR bstrAppName
  99. );
  100. STDMETHOD (QueryGroupIDStatus)(
  101. BSTR bstrGroupID,
  102. VARIANT FAR* bstrBuffer
  103. );
  104. STDMETHOD (ListApplications)(
  105. VARIANT FAR* bstrBuffer
  106. );
  107. STDMETHOD (AddDependency)(
  108. BSTR bstrApplication,
  109. BSTR bstrGroupID
  110. );
  111. STDMETHOD (RemoveDependency)(
  112. BSTR bstrApplication,
  113. BSTR bstrGroupID
  114. );
  115. STDMETHOD (EnableWebServiceExtension)(
  116. BSTR bstrExtension
  117. );
  118. STDMETHOD (DisableWebServiceExtension)(
  119. BSTR bstrExtension
  120. );
  121. STDMETHOD (ListWebServiceExtensions)(
  122. VARIANT FAR* bstrBuffer
  123. );
  124. STDMETHOD (EnableExtensionFile)(
  125. BSTR bstrExtensionFile
  126. );
  127. STDMETHOD (DisableExtensionFile)(
  128. BSTR bstrExtensionFile
  129. );
  130. STDMETHOD (AddExtensionFile)(
  131. BSTR bstrExtensionFile,
  132. VARIANT bAccess,
  133. BSTR bstrGroupID,
  134. VARIANT bCanDelete,
  135. BSTR bstrDescription
  136. );
  137. STDMETHOD (DeleteExtensionFileRecord)(
  138. BSTR bstrExtensionFile
  139. );
  140. STDMETHOD (ListExtensionFiles)(
  141. VARIANT FAR* bstrBuffer
  142. );
  143. protected:
  144. HRESULT
  145. CIISWebService::ConvertArrayToMultiSZ(
  146. VARIANT varSafeArray,
  147. WCHAR** pszServerBindings
  148. );
  149. IADs FAR * _pADs;
  150. LPWSTR _pszServerName;
  151. LPWSTR _pszMetaBasePath;
  152. BOOL _fDispInitialized;
  153. CAggregateeDispMgr FAR * _pDispMgr;
  154. CCredentials _Credentials;
  155. IMSAdminBase *_pAdminBase; //interface pointer
  156. };