AGCDebugHook.h 1000 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #ifndef __AGCDebugHook_h__
  3. #define __AGCDebugHook_h__
  4. /////////////////////////////////////////////////////////////////////////////
  5. // AGCDebugHook.h : Declaration of the CAGCDebugHook class.
  6. //
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CAGCDebugHook
  9. //
  10. class ATL_NO_VTABLE CAGCDebugHook :
  11. public IAGCDebugHook,
  12. public CComObjectRootEx<CComMultiThreadModel>
  13. {
  14. // Interface Map
  15. public:
  16. BEGIN_COM_MAP(CAGCDebugHook)
  17. COM_INTERFACE_ENTRY(IAGCDebugHook)
  18. END_COM_MAP()
  19. // IDebugHook Interface Methods
  20. public:
  21. STDMETHODIMP_(void) DebugOutput(LPCSTR psz)
  22. {
  23. g_app.DebugOutput(psz);
  24. }
  25. STDMETHODIMP_(boolean) OnAssert(LPCSTR psz, LPCSTR pszFile, int line,
  26. LPCSTR pszModule)
  27. {
  28. return g_app.OnAssert(psz, pszFile, line, pszModule);
  29. }
  30. STDMETHODIMP_(void) OnAssertBreak()
  31. {
  32. g_app.OnAssertBreak();
  33. }
  34. };
  35. /////////////////////////////////////////////////////////////////////////////
  36. #endif //__AGCDebugHook_h__