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.

34 lines
955 B

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Copyright (C) Microsoft Corporation, 2000.
  3. //
  4. // errlog.hpp
  5. //
  6. // Direct3D Reference Device - Error log for shader validation.
  7. //
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef __ERRLOG_HPP__
  10. #define __ERRLOG_HPP__
  11. #define ERRORLOG_STRINGSIZE 1024
  12. typedef struct _ErrorLogNode
  13. {
  14. char String[ERRORLOG_STRINGSIZE]; // For individual errors.
  15. _ErrorLogNode* pNext;
  16. } ErrorLogNode;
  17. class CErrorLog
  18. {
  19. ErrorLogNode* m_pHead;
  20. ErrorLogNode* m_pTail;
  21. DWORD m_TotalStringLength;
  22. BOOL m_bRememberAllSpew;
  23. public:
  24. CErrorLog( BOOL bRememberAllSpew );
  25. ~CErrorLog();
  26. void AppendText( const char* pszFormat, ... );
  27. DWORD GetRequiredLogBufferSize() {return m_TotalStringLength + 1;}
  28. void WriteLogToBuffer( char* pBuffer ); // call GetLogBufferSizeRequired first.
  29. };
  30. #endif // __ERRLOG_HPP__