foobar2000 SDK  2015-08-03
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 87 of file win-objects.cpp.

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

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

91  {
92  m_buffer = msgOverride;
93  stamp_hex(p_code);
94 }
void stamp_hex(HRESULT p_code)
Definition: win-objects.cpp:96
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 96 of file win-objects.cpp.

96  {
97  m_buffer << " (0x" << pfc::format_hex((t_uint32)p_code, 8) << ")";
98 }
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: