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.

54 lines
1.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // ExceptionHandler.h
  4. //
  5. // Copyright (C) 1998, 1999 Microsoft Corporation. All rights reserved.
  6. //
  7. // Abstract :
  8. //
  9. // This is the definition of CAppManExceptionHandler
  10. //
  11. // History :
  12. //
  13. // 05/06/1999 luish Created
  14. //
  15. //////////////////////////////////////////////////////////////////////////////////////////////
  16. #ifndef __EXCEPTIONHANDLER_
  17. #define __EXCEPTIONHANDLER_
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #include <windows.h>
  22. #include <objbase.h>
  23. #include "AppManDebug.h"
  24. #ifdef _DEBUG
  25. #define THROW(a) { THROWEXCEPTION((a)); throw (new CAppManExceptionHandler((a), __FILE__, __LINE__)); }
  26. #else
  27. #define THROW(a) throw (new CAppManExceptionHandler((a), __FILE__, __LINE__))
  28. #endif
  29. #define MAX_FILENAME_LEN 64
  30. class CAppManExceptionHandler
  31. {
  32. public :
  33. CAppManExceptionHandler(void);
  34. CAppManExceptionHandler(HRESULT hResult, LPCSTR lpFilename, const DWORD dwLineNumber);
  35. virtual ~CAppManExceptionHandler(void);
  36. STDMETHOD (GetResultCode) (void);
  37. private :
  38. HRESULT m_hResult;
  39. };
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif // __EXCEPTIONHANDLER_