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.

183 lines
5.6 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. Main.cpp
  5. Abstract:
  6. Notes:
  7. History:
  8. 15/11/2000 clupu Created
  9. --*/
  10. #include "precomp.h"
  11. #include "ShimHookMacro.h"
  12. DECLARE_SHIM(AddWritePermissionsToDeviceFiles)
  13. DECLARE_SHIM(ChangeAuthenticationLevel)
  14. DECLARE_SHIM(CorrectBitmapHeader)
  15. DECLARE_SHIM(CorrectCreateEventName)
  16. DECLARE_SHIM(CorrectFilePaths)
  17. DECLARE_SHIM(CorrectSoundDeviceId)
  18. DECLARE_SHIM(DirectPlayEnumOrder)
  19. DECLARE_SHIM(DuplicateHandleFix)
  20. DECLARE_SHIM(EmulateBitmapStride)
  21. DECLARE_SHIM(EmulateCDFS)
  22. DECLARE_SHIM(EmulateClipboardDIBFormat)
  23. DECLARE_SHIM(EmulateCreateFileMapping)
  24. DECLARE_SHIM(EmulateCreateProcess)
  25. DECLARE_SHIM(EmulateDeleteObject)
  26. DECLARE_SHIM(EmulateDirectDrawSync)
  27. DECLARE_SHIM(EmulateDrawText)
  28. DECLARE_SHIM(EmulateEnvironmentBlock)
  29. DECLARE_SHIM(EmulateFindHandles)
  30. DECLARE_SHIM(EmulateGetCommandLine)
  31. DECLARE_SHIM(EmulateGetDeviceCaps)
  32. DECLARE_SHIM(EmulateGetDiskFreeSpace)
  33. DECLARE_SHIM(EmulateJoystick)
  34. DECLARE_SHIM(EmulateGetProfileString)
  35. DECLARE_SHIM(EmulateHeap)
  36. DECLARE_SHIM(EmulateMissingEXE)
  37. DECLARE_SHIM(EmulatePlaySound)
  38. DECLARE_SHIM(EmulatePrinter)
  39. DECLARE_SHIM(EmulateSlowCPU)
  40. DECLARE_SHIM(EmulateTextColor)
  41. DECLARE_SHIM(EmulateToolHelp32)
  42. DECLARE_SHIM(EmulateUSER);
  43. DECLARE_SHIM(EmulateVerQueryValue)
  44. DECLARE_SHIM(EmulateWriteFile)
  45. DECLARE_SHIM(EnableRestarts)
  46. DECLARE_SHIM(FileVersionInfoLie)
  47. DECLARE_SHIM(FeedbackReport)
  48. DECLARE_SHIM(Force640x480)
  49. DECLARE_SHIM(Force8BitColor)
  50. DECLARE_SHIM(ForceAnsiGetDisplayNameOf)
  51. DECLARE_SHIM(ForceCDStop)
  52. DECLARE_SHIM(ForceCoInitialize)
  53. DECLARE_SHIM(ForceDXSetupSuccess)
  54. DECLARE_SHIM(ForceKeepFocus)
  55. DECLARE_SHIM(ForceMessageBoxFocus)
  56. DECLARE_SHIM(ForceShellLinkResolveNoUI)
  57. DECLARE_SHIM(HandleAPIExceptions)
  58. DECLARE_SHIM(HandleRegExpandSzRegistryKeys)
  59. DECLARE_SHIM(HandleWvsprintfExceptions)
  60. DECLARE_SHIM(HideDisplayModes)
  61. DECLARE_SHIM(IgnoreException)
  62. DECLARE_SHIM(IgnoreLoadLibrary)
  63. DECLARE_SHIM(IgnoreOleUninitialize)
  64. DECLARE_SHIM(IgnoreScheduler)
  65. DECLARE_SHIM(MapMemoryB0000)
  66. DECLARE_SHIM(ProfilesEnvStrings)
  67. DECLARE_SHIM(ProfilesGetFolderPath)
  68. DECLARE_SHIM(ProfilesRegQueryValueEx)
  69. DECLARE_SHIM(Shrinker)
  70. DECLARE_SHIM(SingleProcAffinity)
  71. DECLARE_SHIM(SyncSystemAndSystem32)
  72. DECLARE_SHIM(VirtualRegistry)
  73. DECLARE_SHIM(Win2000VersionLie)
  74. DECLARE_SHIM(Win2000SP1VersionLie)
  75. DECLARE_SHIM(Win95VersionLie)
  76. DECLARE_SHIM(Win98VersionLie)
  77. DECLARE_SHIM(WinExecRaceConditionFix)
  78. DECLARE_SHIM(WinNT4SP5VersionLie)
  79. DECLARE_SHIM(Win2kPropagateLayer)
  80. VOID MULTISHIM_NOTIFY_FUNCTION()(DWORD fdwReason)
  81. {
  82. switch (fdwReason)
  83. {
  84. case DLL_PROCESS_ATTACH:
  85. DPF("AcLayers", eDbgLevelSpew, "Layer Shims initialized.");
  86. break;
  87. case DLL_PROCESS_DETACH:
  88. DPF("AcLayers", eDbgLevelSpew, "Layer Shims uninitialized.");
  89. break;
  90. default:
  91. break;
  92. }
  93. }
  94. MULTISHIM_BEGIN()
  95. MULTISHIM_ENTRY(AddWritePermissionsToDeviceFiles)
  96. MULTISHIM_ENTRY(ChangeAuthenticationLevel)
  97. MULTISHIM_ENTRY(CorrectBitmapHeader)
  98. MULTISHIM_ENTRY(CorrectCreateEventName)
  99. MULTISHIM_ENTRY(CorrectFilePaths)
  100. MULTISHIM_ENTRY(CorrectSoundDeviceId)
  101. MULTISHIM_ENTRY(DirectPlayEnumOrder)
  102. MULTISHIM_ENTRY(DuplicateHandleFix)
  103. MULTISHIM_ENTRY(EmulateBitmapStride)
  104. MULTISHIM_ENTRY(EmulateCDFS)
  105. MULTISHIM_ENTRY(EmulateClipboardDIBFormat)
  106. MULTISHIM_ENTRY(EmulateCreateFileMapping)
  107. MULTISHIM_ENTRY(EmulateCreateProcess)
  108. MULTISHIM_ENTRY(EmulateDeleteObject)
  109. MULTISHIM_ENTRY(EmulateDirectDrawSync)
  110. MULTISHIM_ENTRY(EmulateDrawText)
  111. MULTISHIM_ENTRY(EmulateEnvironmentBlock)
  112. MULTISHIM_ENTRY(EmulateFindHandles)
  113. MULTISHIM_ENTRY(EmulateGetCommandLine)
  114. MULTISHIM_ENTRY(EmulateGetDeviceCaps)
  115. MULTISHIM_ENTRY(EmulateGetDiskFreeSpace)
  116. MULTISHIM_ENTRY(EmulateGetProfileString)
  117. MULTISHIM_ENTRY(EmulateJoystick)
  118. MULTISHIM_ENTRY(EmulateHeap)
  119. MULTISHIM_ENTRY(EmulateMissingEXE)
  120. MULTISHIM_ENTRY(EmulatePlaySound)
  121. MULTISHIM_ENTRY(EmulatePrinter)
  122. MULTISHIM_ENTRY(EmulateSlowCPU)
  123. MULTISHIM_ENTRY(EmulateTextColor)
  124. MULTISHIM_ENTRY(EmulateToolHelp32)
  125. MULTISHIM_ENTRY(EmulateUSER)
  126. MULTISHIM_ENTRY(EmulateVerQueryValue)
  127. MULTISHIM_ENTRY(EmulateWriteFile)
  128. MULTISHIM_ENTRY(EnableRestarts)
  129. MULTISHIM_ENTRY(FeedbackReport)
  130. MULTISHIM_ENTRY(FileVersionInfoLie)
  131. MULTISHIM_ENTRY(Force640x480)
  132. MULTISHIM_ENTRY(Force8BitColor)
  133. MULTISHIM_ENTRY(ForceAnsiGetDisplayNameOf)
  134. MULTISHIM_ENTRY(ForceCDStop)
  135. MULTISHIM_ENTRY(ForceCoInitialize)
  136. MULTISHIM_ENTRY(ForceDXSetupSuccess)
  137. MULTISHIM_ENTRY(ForceKeepFocus)
  138. MULTISHIM_ENTRY(ForceMessageBoxFocus)
  139. MULTISHIM_ENTRY(ForceShellLinkResolveNoUI)
  140. MULTISHIM_ENTRY(HandleAPIExceptions)
  141. MULTISHIM_ENTRY(HandleRegExpandSzRegistryKeys)
  142. MULTISHIM_ENTRY(HandleWvsprintfExceptions)
  143. MULTISHIM_ENTRY(HideDisplayModes)
  144. MULTISHIM_ENTRY(IgnoreException)
  145. MULTISHIM_ENTRY(IgnoreLoadLibrary)
  146. MULTISHIM_ENTRY(IgnoreOleUninitialize)
  147. MULTISHIM_ENTRY(IgnoreScheduler)
  148. MULTISHIM_ENTRY(MapMemoryB0000)
  149. MULTISHIM_ENTRY(ProfilesEnvStrings)
  150. MULTISHIM_ENTRY(ProfilesGetFolderPath)
  151. MULTISHIM_ENTRY(ProfilesRegQueryValueEx)
  152. MULTISHIM_ENTRY(Shrinker)
  153. MULTISHIM_ENTRY(SingleProcAffinity)
  154. MULTISHIM_ENTRY(SyncSystemAndSystem32)
  155. MULTISHIM_ENTRY(VirtualRegistry)
  156. MULTISHIM_ENTRY(Win2000VersionLie)
  157. MULTISHIM_ENTRY(Win2000SP1VersionLie)
  158. MULTISHIM_ENTRY(Win95VersionLie)
  159. MULTISHIM_ENTRY(Win98VersionLie)
  160. MULTISHIM_ENTRY(WinExecRaceConditionFix)
  161. MULTISHIM_ENTRY(WinNT4SP5VersionLie)
  162. MULTISHIM_ENTRY(Win2kPropagateLayer)
  163. CALL_MULTISHIM_NOTIFY_FUNCTION()
  164. MULTISHIM_END()