Leaked source code of windows server 2003
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.

32 lines
896 B

  1. // FormatMessage.h: interface for the CFormatMessage class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_FormatMessage_H__032C8A47_665B_46A2_89BC_0818BB3AB1E0__INCLUDED_)
  5. #define AFX_FormatMessage_H__032C8A47_665B_46A2_89BC_0818BB3AB1E0__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CFormatMessage
  10. {
  11. public:
  12. CFormatMessage( long lError );
  13. virtual ~CFormatMessage();
  14. private:
  15. CFormatMessage(){;}
  16. // Implementation
  17. public:
  18. LPTSTR c_str() { return ( NULL != m_psFormattedMessage ) ? m_psFormattedMessage : m_sBuffer; }
  19. // Attributes
  20. protected:
  21. TCHAR m_sBuffer[32]; // Big enough for any HRESULT (in case there is no system message
  22. LPTSTR m_psFormattedMessage;
  23. };
  24. #endif // !defined(AFX_FormatMessage_H__032C8A47_665B_46A2_89BC_0818BB3AB1E0__INCLUDED_)