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
864 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. LotusOrganizer5.cpp
  5. Abstract:
  6. Yield on ResumeThread to avoid poor design and race condition is the app.
  7. Notes:
  8. This is an app specific shim.
  9. History:
  10. 02/17/2000 clupu Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(LotusOrganizer5)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_ENTRY(ResumeThread)
  17. APIHOOK_ENUM_END
  18. /*++
  19. Delay ResumeThread a little bit to avoid a race condition
  20. --*/
  21. BOOL
  22. APIHOOK(ResumeThread)(
  23. HANDLE hThread
  24. )
  25. {
  26. DWORD dwRet;
  27. Sleep(0);
  28. dwRet = ORIGINAL_API(ResumeThread)(hThread);
  29. return dwRet;
  30. }
  31. /*++
  32. Register hooked functions
  33. --*/
  34. HOOK_BEGIN
  35. APIHOOK_ENTRY(KERNEL32.DLL, ResumeThread)
  36. HOOK_END
  37. IMPLEMENT_SHIM_END