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.

68 lines
1.9 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: ServiceConfiguration.cpp
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description: Implementation of the CServiceConfiguration class
  10. //
  11. // Author: tperraut
  12. //
  13. // Revision 03/21/2000 created
  14. //
  15. /////////////////////////////////////////////////////////////////////////////
  16. #include "stdafx.h"
  17. #include "serviceconfiguration.h"
  18. CServiceConfiguration::CServiceConfiguration(CSession& Session)
  19. {
  20. Init(Session, L"Service Configuration");
  21. }
  22. //////////////////////////////////////////////////////////////////////////
  23. // GetMaxLogSize
  24. //////////////////////////////////////////////////////////////////////////
  25. _bstr_t CServiceConfiguration::GetMaxLogSize() const
  26. {
  27. WCHAR TempString[SIZE_LONG_MAX];
  28. _ltow(m_MaxLogSize, TempString, 10);
  29. _bstr_t StringMaxLogSize = TempString;
  30. return StringMaxLogSize;
  31. }
  32. //////////////////////////////////////////////////////////////////////////
  33. // GetLogFrequency
  34. //////////////////////////////////////////////////////////////////////////
  35. _bstr_t CServiceConfiguration::GetLogFrequency() const
  36. {
  37. LONG Frequency;
  38. if ( m_NewLogDaily )
  39. {
  40. Frequency = IAS_LOGGING_DAILY;
  41. }
  42. else if ( m_NewLogWeekly )
  43. {
  44. Frequency = IAS_LOGGING_WEEKLY;
  45. }
  46. else if ( m_NewLogMonthly )
  47. {
  48. Frequency = IAS_LOGGING_MONTHLY;
  49. }
  50. else if ( m_NewLogBySize )
  51. {
  52. Frequency = IAS_LOGGING_WHEN_FILE_SIZE_REACHES;
  53. }
  54. else
  55. {
  56. Frequency = IAS_LOGGING_UNLIMITED_SIZE;
  57. }
  58. WCHAR TempString[SIZE_LONG_MAX];
  59. _ltow(Frequency, TempString, 10);
  60. _bstr_t StringFrequency = TempString;
  61. return StringFrequency;
  62. }