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.

85 lines
1.4 KiB

  1. // Validator.cpp: implementation of the CValidator class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. //***************************************************************************
  5. //
  6. // judyp May 1999
  7. //
  8. //***************************************************************************
  9. #include "stdafx.h"
  10. #include <string>
  11. #include <iosfwd>
  12. #include <iostream>
  13. #include <fstream>
  14. #include <ctime>
  15. #include <list>
  16. using namespace std;
  17. #include <malloc.h>
  18. #include <tchar.h>
  19. #include <windows.h>
  20. #ifdef NONNT5
  21. typedef unsigned long ULONG_PTR;
  22. #endif
  23. #include <wmistr.h>
  24. #include <guiddef.h>
  25. #include <initguid.h>
  26. #include <evntrace.h>
  27. #include <WTYPES.H>
  28. #include "t_string.h"
  29. #include "Persistor.h"
  30. #include "Logger.h"
  31. #include "TCOData.h"
  32. #include "Utilities.h"
  33. #include "StructureWrappers.h"
  34. #include "StructureWapperHelpers.h"
  35. #include "Validator.h"
  36. #define DEFAULT_MIN_BUFFERS 2
  37. CValidator::CValidator()
  38. {
  39. }
  40. CValidator::~CValidator()
  41. {
  42. }
  43. bool CValidator::Validate
  44. (
  45. TRACEHANDLE *pTraceHandle,
  46. LPTSTR lptstrInstanceName,
  47. PEVENT_TRACE_PROPERTIES pProps,
  48. LPTSTR lptstrValidator
  49. )
  50. {
  51. bool bReturn = true;
  52. if (case_insensitive_compare(lptstrValidator, _T("VALIDATION_1.1.1.10.5")))
  53. {
  54. bReturn = pProps->MinimumBuffers == DEFAULT_MIN_BUFFERS;
  55. if (bReturn)
  56. {
  57. t_cout << _T("Validator passed.\n");
  58. }
  59. else
  60. {
  61. t_cout << _T("Validator failed.\n");
  62. }
  63. }
  64. return bReturn;
  65. }