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.

66 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. OfficeTS.cpp
  5. Abstract:
  6. Lie to office about GUI-Effects if on a TS machine.
  7. Notes:
  8. This is an app specific shim.
  9. History:
  10. 08/07/2002 linstev Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(OfficeTS)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_ENTRY(SystemParametersInfoA)
  17. APIHOOK_ENUM_END
  18. /*++
  19. After we call GetDlgItemTextA we convert the long path name to the short path name.
  20. --*/
  21. BOOL
  22. APIHOOK(SystemParametersInfoA)(
  23. UINT uiAction, // system parameter to retrieve or set
  24. UINT uiParam, // depends on action to be taken
  25. PVOID pvParam, // depends on action to be taken
  26. UINT fWinIni // user profile update option
  27. )
  28. {
  29. BOOL bRet = ORIGINAL_API(SystemParametersInfoA)(uiAction, uiParam, pvParam, fWinIni);
  30. if (bRet && pvParam && (uiAction == SPI_GETUIEFFECTS) && GetSystemMetrics(SM_REMOTESESSION)) {
  31. *(BOOL *)pvParam = FALSE;
  32. }
  33. return bRet;
  34. }
  35. /*++
  36. Register hooked functions
  37. --*/
  38. HOOK_BEGIN
  39. APIHOOK_ENTRY(USER32.DLL, SystemParametersInfoA)
  40. HOOK_END
  41. IMPLEMENT_SHIM_END