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.

63 lines
974 B

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. MyPhotoCenter2.cpp
  5. Abstract:
  6. Ignore Exception caused by the application "My Photo Center 2".
  7. Notes:
  8. This is an app specific shim.
  9. History:
  10. 04/25/2002 v-bvella Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(MyPhotoCenter2)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_ENTRY(ReleaseStgMedium)
  17. APIHOOK_ENUM_END
  18. /*++
  19. This function intercepts ReleaseStgMedium call. It will ignore exception
  20. cased by ReleaseStgMedium.
  21. --*/
  22. void
  23. APIHOOK(ReleaseStgMedium)(
  24. STGMEDIUM *pmedium //Pointer to storage medium to be freed
  25. )
  26. {
  27. __try {
  28. ORIGINAL_API(ReleaseStgMedium)(pmedium);
  29. }
  30. __except (1) {
  31. return;
  32. }
  33. return;
  34. }
  35. /*++
  36. Register hooked functions
  37. --*/
  38. HOOK_BEGIN
  39. APIHOOK_ENTRY(OLE32.DLL, ReleaseStgMedium)
  40. HOOK_END
  41. IMPLEMENT_SHIM_END