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.

94 lines
2.8 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: BadApplication.cpp
  3. //
  4. // Copyright (c) 2000, Microsoft Corporation
  5. //
  6. // Class to encapsulate identification of a bad application.
  7. //
  8. // History: 2000-08-25 vtan created
  9. // 2000-11-04 vtan split into separate file
  10. // --------------------------------------------------------------------------
  11. #ifdef _X86_
  12. #include "StandardHeader.h"
  13. #include "BadApplication.h"
  14. // --------------------------------------------------------------------------
  15. // CBadApplication::CBadApplication
  16. //
  17. // Arguments: <none>
  18. //
  19. // Returns: <none>
  20. //
  21. // Purpose: Default constructor for CBadApplication. This just clears the
  22. // application image name.
  23. //
  24. // History: 2000-08-25 vtan created
  25. // --------------------------------------------------------------------------
  26. CBadApplication::CBadApplication (void)
  27. {
  28. ZeroMemory(&_szImageName, sizeof(_szImageName));
  29. }
  30. // --------------------------------------------------------------------------
  31. // CBadApplication::CBadApplication
  32. //
  33. // Arguments: pszImageName = Image name of application.
  34. //
  35. // Returns: <none>
  36. //
  37. // Purpose: Constructor for CBadApplication. This copies the given
  38. // application image name.
  39. //
  40. // History: 2000-08-25 vtan created
  41. // --------------------------------------------------------------------------
  42. CBadApplication::CBadApplication (const TCHAR *pszImageName)
  43. {
  44. ZeroMemory(&_szImageName, sizeof(_szImageName));
  45. lstrcpyn(_szImageName, pszImageName, ARRAYSIZE(_szImageName));
  46. }
  47. // --------------------------------------------------------------------------
  48. // CBadApplication::~CBadApplication
  49. //
  50. // Arguments: <none>
  51. //
  52. // Returns: <none>
  53. //
  54. // Purpose: Destructor for CBadApplication. Releases any resources used.
  55. //
  56. // History: 2000-08-25 vtan created
  57. // --------------------------------------------------------------------------
  58. CBadApplication::~CBadApplication (void)
  59. {
  60. }
  61. // --------------------------------------------------------------------------
  62. // CBadApplication::operator ==
  63. //
  64. // Arguments: compareObject = Object to compare against.
  65. //
  66. // Returns: bool
  67. //
  68. // Purpose: Overloaded operator == to facilitate easier comparison on two
  69. // CBadApplication objects.
  70. //
  71. // History: 2000-08-25 vtan created
  72. // --------------------------------------------------------------------------
  73. bool CBadApplication::operator == (const CBadApplication& compareObject) const
  74. {
  75. return(lstrcmpi(compareObject._szImageName, _szImageName) == 0);
  76. }
  77. #endif /* _X86_ */