foobar2000 SDK  2015-01-14
Public Member Functions | Private Member Functions | Private Attributes
format_hresult

#include <win-objects.h>

Public Member Functions

 format_hresult (HRESULT p_code)
 
 format_hresult (HRESULT p_code, const char *msgOverride)
 
const char * get_ptr () const
 
 operator const char * () const
 

Private Member Functions

void stamp_hex (HRESULT p_code)
 

Private Attributes

pfc::string_formatter m_buffer
 

Detailed Description

Definition at line 30 of file win-objects.h.

Constructor & Destructor Documentation

format_hresult::format_hresult ( HRESULT  p_code)

Definition at line 85 of file win-objects.cpp.

85  {
86  if (!pfc::winFormatSystemErrorMessage(m_buffer,(DWORD)p_code)) m_buffer = "Unknown error code";
87  stamp_hex(p_code);
88 }
void stamp_hex(HRESULT p_code)
Definition: win-objects.cpp:94
pfc::string_formatter m_buffer
Definition: win-objects.h:39
BOOL winFormatSystemErrorMessage(pfc::string_base &p_out, DWORD p_code)
Definition: win-objects.cpp:5
format_hresult::format_hresult ( HRESULT  p_code,
const char *  msgOverride 
)

Definition at line 89 of file win-objects.cpp.

89  {
90  m_buffer = msgOverride;
91  stamp_hex(p_code);
92 }
void stamp_hex(HRESULT p_code)
Definition: win-objects.cpp:94
pfc::string_formatter m_buffer
Definition: win-objects.h:39

Member Function Documentation

const char* format_hresult::get_ptr ( ) const
inline

Definition at line 35 of file win-objects.h.

35 {return m_buffer.get_ptr();}
pfc::string_formatter m_buffer
Definition: win-objects.h:39
format_hresult::operator const char * ( ) const
inline

Definition at line 36 of file win-objects.h.

36 {return m_buffer.get_ptr();}
pfc::string_formatter m_buffer
Definition: win-objects.h:39
void format_hresult::stamp_hex ( HRESULT  p_code)
private

Definition at line 94 of file win-objects.cpp.

94  {
95  m_buffer << " (0x" << pfc::format_hex((t_uint32)p_code, 8) << ")";
96 }
pfc::string_formatter m_buffer
Definition: win-objects.h:39
uint32_t t_uint32
Definition: int_types.h:5

Field Documentation

pfc::string_formatter format_hresult::m_buffer
private

Definition at line 39 of file win-objects.h.


The documentation for this class was generated from the following files: