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.

89 lines
2.0 KiB

  1. //////////////////////////////////////////////////////////////////////
  2. // TranxMgr.h : Declaration of CTranxManager
  3. // Copyright (c)1997-2001 Microsoft Corporation
  4. //
  5. // Original Create Date: 4/9/2001
  6. // Original Author: shawnwu
  7. //////////////////////////////////////////////////////////////////////
  8. #pragma once
  9. #include "globals.h"
  10. #include "IPSecBase.h"
  11. /*
  12. Class description
  13. Naming:
  14. CTranxManager stands for Transaction Manager.
  15. Base class:
  16. None.
  17. Purpose of class:
  18. (1) To support method execution for the purpose of supporting rollback. Its WMI class
  19. is called Nsp_TranxManager.
  20. Design:
  21. (1) This is one of the classes that differ drastically to the rest of C++ classes
  22. for the WMI corresponding classes. This class is directly used by our provider class
  23. CNetSecProv when method is to be executed because all those method execution is
  24. going to go through this class. Since Nsp_TranxManager doesn't have any other property
  25. and it is not a dyanmic class, we don't need to do anything other than implementing
  26. the ExecMethod called from CNetSecProv.
  27. (2) Because of the nature of the class, we don't even allow you to create an instance.
  28. Use:
  29. (1) Just call the static function.
  30. */
  31. class CTranxManager
  32. {
  33. protected:
  34. CTranxManager(){};
  35. ~CTranxManager(){};
  36. public:
  37. static
  38. HRESULT ExecMethod (
  39. IN IWbemServices * pNamespace,
  40. IN LPCWSTR pszMethod,
  41. IN IWbemContext * pCtx,
  42. IN IWbemClassObject * pInParams,
  43. IN IWbemObjectSink * pSink
  44. );
  45. private:
  46. //
  47. // for testing xml file parsing
  48. //
  49. //#ifdef _DEBUG
  50. static
  51. HRESULT ParseXMLFile (
  52. IN LPCWSTR pszInput,
  53. IN LPCWSTR pszOutput,
  54. IN LPCWSTR pszArea,
  55. IN LPCWSTR pszSection,
  56. IN bool bSingleSection
  57. );
  58. //#endif
  59. };