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.

71 lines
2.1 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Copyright � 2001 Microsoft Corporation. All rights reserved.
  3. // PragmaUnsafeModule.h : Declaration of the CPragmaUnsafeModule class.
  4. //
  5. #pragma once
  6. #include "resource.h"
  7. #include <IPREfastModuleImpl.h>
  8. /////////////////////////////////////////////////////////////////////////////
  9. // {5686D66D-BE0D-43DA-B315-64B85BAFB790}
  10. extern "C" const __declspec(selectany) GUID CLSID_PragmaUnsafeModule =
  11. {0x5686D66D,0xBE0D,0x43DA,{0xB3,0x15,0x64,0xB8,0x5B,0xAF,0xB7,0x90}};
  12. /////////////////////////////////////////////////////////////////////////////
  13. // Declaration of CPragmaUnsafeModule
  14. //
  15. class ATL_NO_VTABLE CPragmaUnsafeModule :
  16. public IPREfastModuleImpl<CPragmaUnsafeModule>,
  17. public CComObjectRootEx<CComObjectThreadModel>,
  18. public CComCoClass<CPragmaUnsafeModule, &CLSID_PragmaUnsafeModule>
  19. {
  20. // Declarations
  21. public:
  22. DECLARE_REGISTRY_RESOURCEID(IDR_PragmaUnsafeModule)
  23. DECLARE_PROTECT_FINAL_CONSTRUCT()
  24. DECLARE_PREFAST_MODULE_ID(8888);
  25. // Interface Map
  26. public:
  27. BEGIN_COM_MAP(CPragmaUnsafeModule)
  28. COM_INTERFACE_ENTRIES_IPREfastModuleImpl()
  29. END_COM_MAP()
  30. // Category Map
  31. public:
  32. BEGIN_CATEGORY_MAP(CPragmaUnsafeModule)
  33. IMPLEMENTED_CATEGORY(CATID_PREfastDefectModules)
  34. END_CATEGORY_MAP()
  35. // Implementation
  36. protected:
  37. // Analysis member functions.
  38. void CheckNode(ITree* pNode, DWORD level);
  39. void CheckNodeAndDescendants(ITree* pNode, DWORD level);
  40. // IPREfastModule Interface Methods
  41. public:
  42. STDMETHODIMP raw_Events(AstEvents *Events);
  43. STDMETHODIMP raw_OnFileStart(ICompilationUnit* pcu);
  44. STDMETHODIMP raw_OnDeclaration(ICompilationUnit* pcu);
  45. STDMETHODIMP raw_OnFunction(ICompilationUnit* pcu);
  46. STDMETHODIMP raw_OnFileEnd(ICompilationUnit* pcu);
  47. STDMETHODIMP raw_OnDirective(ICompilationUnit* pcu);
  48. // Data Members
  49. protected:
  50. // The pointer to the function being analyzed.
  51. ITreePtr m_spCurrFunction;
  52. // Warning Codes
  53. public:
  54. // Include defect description information
  55. #include <DefectDefs.h>
  56. };
  57. /////////////////////////////////////////////////////////////////////////////