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.

109 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. Main.cpp
  5. Abstract:
  6. Container for all verifier shims definitions.
  7. History:
  8. 01/25/2000 clupu Created
  9. --*/
  10. #include "precomp.h"
  11. #include "ShimHookMacro.h"
  12. #include "veriflog.h"
  13. #include "ids.h"
  14. DECLARE_SHIM(FilePaths)
  15. DECLARE_SHIM(HighVersionLie)
  16. DECLARE_SHIM(RegistryChecks)
  17. DECLARE_SHIM(LogStartAndStop)
  18. DECLARE_SHIM(WindowsFileProtection)
  19. DECLARE_SHIM(DXFileVersionInfo)
  20. DECLARE_SHIM(LogRegistryChanges)
  21. DECLARE_SHIM(LogFileChanges)
  22. DECLARE_SHIM(ObsoleteAPICalls)
  23. DECLARE_SHIM(KernelModeDriverInstall)
  24. DECLARE_SHIM(SecurityChecks)
  25. VOID MULTISHIM_NOTIFY_FUNCTION()(DWORD fdwReason)
  26. {
  27. switch (fdwReason)
  28. {
  29. case DLL_PROCESS_ATTACH:
  30. DPF("VerifierShims", eDbgLevelSpew, "Verifier Shims initialized.");
  31. break;
  32. case DLL_PROCESS_DETACH:
  33. DPF("VerifierShims", eDbgLevelSpew, "Verifier Shims uninitialized.");
  34. break;
  35. case SHIM_PROCESS_DYING:
  36. //
  37. // Push our DLL to be the last one to be unloaded.
  38. //
  39. MakeShimUnloadLast(NULL);
  40. break;
  41. default:
  42. break;
  43. }
  44. }
  45. MULTISHIM_BEGIN()
  46. INIT_VLOG_SUPPORT()
  47. MULTISHIM_ENTRY(LogStartAndStop)
  48. MULTISHIM_ENTRY(FilePaths)
  49. MULTISHIM_ENTRY(HighVersionLie)
  50. MULTISHIM_ENTRY(RegistryChecks)
  51. MULTISHIM_ENTRY(WindowsFileProtection)
  52. MULTISHIM_ENTRY(DXFileVersionInfo)
  53. MULTISHIM_ENTRY(LogRegistryChanges)
  54. MULTISHIM_ENTRY(LogFileChanges)
  55. MULTISHIM_ENTRY(ObsoleteAPICalls)
  56. MULTISHIM_ENTRY(KernelModeDriverInstall)
  57. MULTISHIM_ENTRY(SecurityChecks)
  58. CALL_MULTISHIM_NOTIFY_FUNCTION()
  59. MULTISHIM_END()
  60. DECLARE_VERIFIER_DLL()
  61. DECLARE_VERIFIER_SHIM(LogStartAndStop)
  62. DECLARE_VERIFIER_SHIM(FilePaths)
  63. DECLARE_VERIFIER_SHIM(HighVersionLie)
  64. DECLARE_VERIFIER_SHIM(RegistryChecks)
  65. DECLARE_VERIFIER_SHIM(WindowsFileProtection)
  66. DECLARE_VERIFIER_SHIM(DXFileVersionInfo)
  67. DECLARE_VERIFIER_SHIM(LogRegistryChanges)
  68. DECLARE_VERIFIER_SHIM(LogFileChanges)
  69. DECLARE_VERIFIER_SHIM(ObsoleteAPICalls)
  70. DECLARE_VERIFIER_SHIM(KernelModeDriverInstall)
  71. DECLARE_VERIFIER_SHIM(SecurityChecks)
  72. ENUM_VERIFIER_SHIMS_BEGIN()
  73. ENUM_VERIFIER_SHIMS_ENTRY(LogStartAndStop)
  74. ENUM_VERIFIER_SHIMS_ENTRY(FilePaths)
  75. ENUM_VERIFIER_SHIMS_ENTRY(HighVersionLie)
  76. ENUM_VERIFIER_SHIMS_ENTRY(RegistryChecks)
  77. ENUM_VERIFIER_SHIMS_ENTRY(WindowsFileProtection)
  78. ENUM_VERIFIER_SHIMS_ENTRY(DXFileVersionInfo)
  79. ENUM_VERIFIER_SHIMS_ENTRY(LogRegistryChanges)
  80. ENUM_VERIFIER_SHIMS_ENTRY(LogFileChanges)
  81. ENUM_VERIFIER_SHIMS_ENTRY(ObsoleteAPICalls)
  82. ENUM_VERIFIER_SHIMS_ENTRY(KernelModeDriverInstall)
  83. ENUM_VERIFIER_SHIMS_ENTRY(SecurityChecks)
  84. ENUM_VERIFIER_SHIMS_END()