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.

61 lines
921 B

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. SpeechViewer3.cpp
  5. Abstract:
  6. The app requires ChangeDisplaySettings to cause a permanent mode change.
  7. Notes:
  8. This is an app specific shim.
  9. History:
  10. 05/23/2001 linstev Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(SpeechViewer3)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_ENTRY(ChangeDisplaySettingsA)
  17. APIHOOK_ENUM_END
  18. /*++
  19. Make the mode change permanent.
  20. --*/
  21. LONG
  22. APIHOOK(ChangeDisplaySettingsA)(
  23. LPDEVMODEA lpDevMode,
  24. DWORD dwFlags
  25. )
  26. {
  27. if (dwFlags & CDS_FULLSCREEN) {
  28. dwFlags = 0;
  29. }
  30. return ORIGINAL_API(ChangeDisplaySettingsA)(lpDevMode, dwFlags);
  31. }
  32. /*++
  33. Register hooked functions
  34. --*/
  35. HOOK_BEGIN
  36. APIHOOK_ENTRY(USER32.DLL, ChangeDisplaySettingsA)
  37. HOOK_END
  38. IMPLEMENT_SHIM_END