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.

191 lines
6.0 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(WinXPVersionLie)
  74. DECLARE_SHIM(WinXPSP1VersionLie)
  75. DECLARE_SHIM(Win2000VersionLie)
  76. DECLARE_SHIM(Win2000SP1VersionLie)
  77. DECLARE_SHIM(Win2000SP2VersionLie)
  78. DECLARE_SHIM(Win2000SP3VersionLie)
  79. DECLARE_SHIM(Win95VersionLie)
  80. DECLARE_SHIM(Win98VersionLie)
  81. DECLARE_SHIM(WinExecRaceConditionFix)
  82. DECLARE_SHIM(WinNT4SP5VersionLie)
  83. DECLARE_SHIM(Win2kPropagateLayer)
  84. VOID MULTISHIM_NOTIFY_FUNCTION()(DWORD fdwReason)
  85. {
  86. switch (fdwReason)
  87. {
  88. case DLL_PROCESS_ATTACH:
  89. DPF("AcLayers", eDbgLevelSpew, "Layer Shims initialized.");
  90. break;
  91. case DLL_PROCESS_DETACH:
  92. DPF("AcLayers", eDbgLevelSpew, "Layer Shims uninitialized.");
  93. break;
  94. default:
  95. break;
  96. }
  97. }
  98. MULTISHIM_BEGIN()
  99. MULTISHIM_ENTRY(AddWritePermissionsToDeviceFiles)
  100. MULTISHIM_ENTRY(ChangeAuthenticationLevel)
  101. MULTISHIM_ENTRY(CorrectBitmapHeader)
  102. MULTISHIM_ENTRY(CorrectCreateEventName)
  103. MULTISHIM_ENTRY(CorrectFilePaths)
  104. MULTISHIM_ENTRY(CorrectSoundDeviceId)
  105. MULTISHIM_ENTRY(DirectPlayEnumOrder)
  106. MULTISHIM_ENTRY(DuplicateHandleFix)
  107. MULTISHIM_ENTRY(EmulateBitmapStride)
  108. MULTISHIM_ENTRY(EmulateCDFS)
  109. MULTISHIM_ENTRY(EmulateClipboardDIBFormat)
  110. MULTISHIM_ENTRY(EmulateCreateFileMapping)
  111. MULTISHIM_ENTRY(EmulateCreateProcess)
  112. MULTISHIM_ENTRY(EmulateDeleteObject)
  113. MULTISHIM_ENTRY(EmulateDirectDrawSync)
  114. MULTISHIM_ENTRY(EmulateDrawText)
  115. MULTISHIM_ENTRY(EmulateEnvironmentBlock)
  116. MULTISHIM_ENTRY(EmulateFindHandles)
  117. MULTISHIM_ENTRY(EmulateGetCommandLine)
  118. MULTISHIM_ENTRY(EmulateGetDeviceCaps)
  119. MULTISHIM_ENTRY(EmulateGetDiskFreeSpace)
  120. MULTISHIM_ENTRY(EmulateGetProfileString)
  121. MULTISHIM_ENTRY(EmulateJoystick)
  122. MULTISHIM_ENTRY(EmulateHeap)
  123. MULTISHIM_ENTRY(EmulateMissingEXE)
  124. MULTISHIM_ENTRY(EmulatePlaySound)
  125. MULTISHIM_ENTRY(EmulatePrinter)
  126. MULTISHIM_ENTRY(EmulateSlowCPU)
  127. MULTISHIM_ENTRY(EmulateTextColor)
  128. MULTISHIM_ENTRY(EmulateToolHelp32)
  129. MULTISHIM_ENTRY(EmulateUSER)
  130. MULTISHIM_ENTRY(EmulateVerQueryValue)
  131. MULTISHIM_ENTRY(EmulateWriteFile)
  132. MULTISHIM_ENTRY(EnableRestarts)
  133. MULTISHIM_ENTRY(FeedbackReport)
  134. MULTISHIM_ENTRY(FileVersionInfoLie)
  135. MULTISHIM_ENTRY(Force640x480)
  136. MULTISHIM_ENTRY(Force8BitColor)
  137. MULTISHIM_ENTRY(ForceAnsiGetDisplayNameOf)
  138. MULTISHIM_ENTRY(ForceCDStop)
  139. MULTISHIM_ENTRY(ForceCoInitialize)
  140. MULTISHIM_ENTRY(ForceDXSetupSuccess)
  141. MULTISHIM_ENTRY(ForceKeepFocus)
  142. MULTISHIM_ENTRY(ForceMessageBoxFocus)
  143. MULTISHIM_ENTRY(ForceShellLinkResolveNoUI)
  144. MULTISHIM_ENTRY(HandleAPIExceptions)
  145. MULTISHIM_ENTRY(HandleRegExpandSzRegistryKeys)
  146. MULTISHIM_ENTRY(HandleWvsprintfExceptions)
  147. MULTISHIM_ENTRY(HideDisplayModes)
  148. MULTISHIM_ENTRY(IgnoreException)
  149. MULTISHIM_ENTRY(IgnoreLoadLibrary)
  150. MULTISHIM_ENTRY(IgnoreOleUninitialize)
  151. MULTISHIM_ENTRY(IgnoreScheduler)
  152. MULTISHIM_ENTRY(MapMemoryB0000)
  153. MULTISHIM_ENTRY(ProfilesEnvStrings)
  154. MULTISHIM_ENTRY(ProfilesGetFolderPath)
  155. MULTISHIM_ENTRY(ProfilesRegQueryValueEx)
  156. MULTISHIM_ENTRY(Shrinker)
  157. MULTISHIM_ENTRY(SingleProcAffinity)
  158. MULTISHIM_ENTRY(SyncSystemAndSystem32)
  159. MULTISHIM_ENTRY(VirtualRegistry)
  160. MULTISHIM_ENTRY(WinXPVersionLie)
  161. MULTISHIM_ENTRY(WinXPSP1VersionLie)
  162. MULTISHIM_ENTRY(Win2000VersionLie)
  163. MULTISHIM_ENTRY(Win2000SP1VersionLie)
  164. MULTISHIM_ENTRY(Win2000SP2VersionLie)
  165. MULTISHIM_ENTRY(Win2000SP3VersionLie)
  166. MULTISHIM_ENTRY(Win95VersionLie)
  167. MULTISHIM_ENTRY(Win98VersionLie)
  168. MULTISHIM_ENTRY(WinExecRaceConditionFix)
  169. MULTISHIM_ENTRY(WinNT4SP5VersionLie)
  170. MULTISHIM_ENTRY(Win2kPropagateLayer)
  171. CALL_MULTISHIM_NOTIFY_FUNCTION()
  172. MULTISHIM_END()