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.

75 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. ServiceMethod.h
  5. Abstract:
  6. Defines the CServiceMethod class.
  7. All the methods in this class return HRESULTs and do not throw exceptions.
  8. Author:
  9. Mohit Srivastava 25-March-01
  10. Revision History:
  11. --*/
  12. #ifndef _ServiceMethod_h_
  13. #define _ServiceMethod_h_
  14. #include "sitecreator.h"
  15. #include "wbemservices.h"
  16. #include "schema.h"
  17. class CServiceMethod
  18. {
  19. public:
  20. CServiceMethod(
  21. eSC_SUPPORTED_SERVICES i_eServiceId);
  22. ~CServiceMethod();
  23. HRESULT CreateNewSite(
  24. LPCWSTR i_wszServerComment,
  25. PDWORD o_pdwSiteId,
  26. PDWORD i_pdwRequestedSiteId = NULL);
  27. HRESULT CreateNewSite(
  28. CWbemServices* i_pNamespace,
  29. LPCWSTR i_wszMbPath, // needed for creating WMI return object
  30. IWbemContext* i_pCtx, // needed for creating WMI return object
  31. WMI_CLASS* i_pClass, // needed for creating WMI return object
  32. WMI_METHOD* i_pMethod, // needed for creating WMI return object
  33. IWbemClassObject* i_pInParams,
  34. IWbemClassObject** o_ppRetObj);
  35. HRESULT Init();
  36. private:
  37. HRESULT InternalGetInParams(
  38. IWbemClassObject* i_pInParams,
  39. VARIANT& io_refServerId,
  40. VARIANT& io_refServerComment,
  41. VARIANT& io_refServerBindings,
  42. VARIANT& io_refPath);
  43. HRESULT InternalCreateNewSite(
  44. CWbemServices& i_refNamespace, // for formatted multisz: ServerBinding
  45. const VARIANT& i_refServerComment,
  46. const VARIANT& i_refServerBindings,
  47. const VARIANT& i_refPathOfRootVirtualDir,
  48. IIISApplicationAdmin* i_pIApplAdmin,
  49. PDWORD o_pdwSiteId,
  50. PDWORD i_pdwRequestedSiteId = NULL);
  51. bool m_bInit;
  52. CSiteCreator* m_pSiteCreator;
  53. eSC_SUPPORTED_SERVICES m_eServiceId;
  54. };
  55. #endif // _ServiceMethod_h