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.

49 lines
1.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: moreutil.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef __MMCUTIL_H__
  11. #define __MMCUTIL_H__
  12. /*
  13. mmcutil.h
  14. Some extra macros and definitions to aid the anti-MFC effort
  15. */
  16. #if 1
  17. #define MMC_TRY
  18. #define MMC_CATCH
  19. #else
  20. #define MMC_TRY \
  21. try {
  22. #define MMC_CATCH \
  23. } \
  24. catch ( std::bad_alloc ) \
  25. { \
  26. ASSERT( FALSE ); \
  27. return E_OUTOFMEMORY; \
  28. } \
  29. catch ( std::exception ) \
  30. { \
  31. ASSERT( FALSE ); \
  32. return E_UNEXPECTED; \
  33. }
  34. #endif
  35. BOOL _IsValidAddress(const void* lp, UINT nBytes, BOOL bReadWrite = TRUE);
  36. #endif // __MMCUTIL_H__