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.

87 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. Quicken2000.cpp
  5. Abstract:
  6. Change the value of a registry key for Quicken 2000 setup.
  7. This is needed to disable a kernel mode driver that
  8. blue-screens in Win2k.
  9. Notes:
  10. This is an app specific shim.
  11. History:
  12. 02/16/2000 clupu Created
  13. --*/
  14. #include "precomp.h"
  15. IMPLEMENT_SHIM_BEGIN(Quicken2000)
  16. #include "ShimHookMacro.h"
  17. APIHOOK_ENUM_BEGIN
  18. APIHOOK_ENUM_ENTRY(RegSetValueExA)
  19. APIHOOK_ENUM_END
  20. /*++
  21. Change the value passed for "Start" from 0 to 4 to prevent a kernel mode
  22. driver from blue-screening Win2k.
  23. --*/
  24. LONG
  25. APIHOOK(RegSetValueExA)(
  26. HKEY hKey,
  27. LPCSTR lpValueName,
  28. DWORD Reserved,
  29. DWORD dwType,
  30. CONST BYTE * lpData,
  31. DWORD cbData
  32. )
  33. {
  34. if (lstrcmpA(lpValueName, "Start") == 0 &&
  35. dwType == REG_DWORD &&
  36. cbData == 4) {
  37. DPFN( eDbgLevelInfo, "[Quicken2000] RegSetValueExA changed to 4");
  38. *(DWORD*)lpData = 4;
  39. }
  40. /*
  41. * Call the original API
  42. */
  43. return ORIGINAL_API(RegSetValueExA)(
  44. hKey,
  45. lpValueName,
  46. Reserved,
  47. dwType,
  48. lpData,
  49. cbData);
  50. }
  51. /*++
  52. Register hooked functions
  53. --*/
  54. HOOK_BEGIN
  55. APIHOOK_ENTRY(ADVAPI32.DLL, RegSetValueExA)
  56. HOOK_END
  57. IMPLEMENT_SHIM_END