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.

50 lines
991 B

  1. // Gemplus (C) 1999
  2. // Version 1.0
  3. // Author: Sergey Ivanov
  4. // Date of creation - 18.05.1999
  5. // Change log:
  6. //
  7. #ifndef DBG_INT
  8. #define DBG_INT
  9. #include "generic.h"
  10. #pragma PAGEDCODE
  11. class CDebug;
  12. class CDebug
  13. {
  14. public:
  15. NTSTATUS m_Status;
  16. SAFE_DESTRUCTORS();
  17. virtual VOID dispose(){self_delete();};
  18. protected:
  19. CDebug(){initializeUsage();};
  20. public:
  21. virtual ~CDebug(){};
  22. /*Open(CDevice*) {};
  23. Close(CDevice*) {};
  24. CopyDebug(CDevice*) {};
  25. trace(...) {};
  26. */
  27. virtual VOID start() {};
  28. virtual VOID stop() {};
  29. virtual VOID trace(PCH Format,... ) {};
  30. virtual VOID trace_buffer(PVOID pBuffer,ULONG BufferLength) {};
  31. VOID initializeUsage(){usage = 0;};
  32. LONG incrementUsage(){return ++usage;};
  33. LONG decrementUsage(){return --usage;};
  34. protected:
  35. BOOL active;
  36. private:
  37. LONG usage;
  38. };
  39. #define TRACE if(debug) debug->trace
  40. #define TRACE_BUFFER if(debug) debug->trace_buffer
  41. #define DEBUG_START() if(debug) debug->start()
  42. #define DEBUG_STOP() if(debug) debug->stop()
  43. #endif//DEBUG