mirror of https://github.com/tongzx/nt5src
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.
55 lines
1.2 KiB
55 lines
1.2 KiB
//////////////////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// ExceptionHandler.h
|
|
//
|
|
// Copyright (C) 1998, 1999 Microsoft Corporation. All rights reserved.
|
|
//
|
|
// Abstract :
|
|
//
|
|
// This is the definition of CAppManExceptionHandler
|
|
//
|
|
// History :
|
|
//
|
|
// 05/06/1999 luish Created
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef __EXCEPTIONHANDLER_
|
|
#define __EXCEPTIONHANDLER_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <windows.h>
|
|
#include <objbase.h>
|
|
#include "AppManDebug.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define THROW(a) { THROWEXCEPTION((a)); throw (new CAppManExceptionHandler((a), __FILE__, __LINE__)); }
|
|
#else
|
|
#define THROW(a) throw (new CAppManExceptionHandler((a), __FILE__, __LINE__))
|
|
#endif
|
|
|
|
#define MAX_FILENAME_LEN 64
|
|
|
|
class CAppManExceptionHandler
|
|
{
|
|
public :
|
|
|
|
CAppManExceptionHandler(void);
|
|
CAppManExceptionHandler(HRESULT hResult, LPCSTR lpFilename, const DWORD dwLineNumber);
|
|
virtual ~CAppManExceptionHandler(void);
|
|
|
|
STDMETHOD (GetResultCode) (void);
|
|
|
|
private :
|
|
|
|
HRESULT m_hResult;
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // __EXCEPTIONHANDLER_
|