Functions

AppSecInc::Formatter Namespace Reference

Common message formatting. More...

Functions

std::string FormatMessageFromHRA (HRESULT hr)
 format an ANSI message from an HRESULT
std::string FormatMessageFromLastErrorCodeA (DWORD)
 format an ANSI message from a Win32 error code
std::wstring FormatMessageFromHRW (HRESULT hr)
 format a UNICODE message from an HRESULT
std::wstring FormatMessageFromLastErrorCodeW (DWORD)
 format a UNICODE message from a Win32 error code
std::string FormatMessageFromVArgs (char *, va_list &)
 format a message with a list of arguments (printf-style)
std::wstring FormatMessageFromVArgs (wchar_t *, va_list &)
 format a message with a list of arguments (printf-style)
std::string FormatMessage (char *,...)
 format a message with a list of arguments (printf-style)
std::wstring FormatMessage (wchar_t *,...)
 format a message with a list of arguments (printf-style)
std::string FormatHexA (byte *buffer, unsigned long len)
 format an ANSI buffer of bytes into a hex view
std::wstring FormatHexW (byte *buffer, unsigned long len)
 format a UNICODE buffer of bytes into a hex view
std::string FormatHexStringA (byte *buffer, unsigned long len)
 format an ANSI buffer of bytes into a hex string
std::wstring FormatHexStringW (byte *buffer, unsigned long len)
 format a UNICODE buffer of bytes into a hex string
std::wstring FormatTemplate (const std::wstring &buffer, const std::map< std::wstring, std::wstring > &tokens, const std::wstring &left=L"[", const std::wstring &right=L"]")
 format a UNICODE template
std::string FormatTemplate (const std::string &buffer, const std::map< std::string, std::string > &tokens, const std::string &left="[", const std::string &right="]")
 format an ANSI template

Detailed Description

Common message formatting.


Function Documentation

std::string AppSecInc::Formatter::FormatHexA ( byte *  buffer,
unsigned long  len 
)

format an ANSI buffer of bytes into a hex view

std::string AppSecInc::Formatter::FormatHexStringA ( byte *  buffer,
unsigned long  len 
)

format an ANSI buffer of bytes into a hex string

std::wstring AppSecInc::Formatter::FormatHexStringW ( byte *  buffer,
unsigned long  len 
)

format a UNICODE buffer of bytes into a hex string

std::wstring AppSecInc::Formatter::FormatHexW ( byte *  buffer,
unsigned long  len 
)

format a UNICODE buffer of bytes into a hex view

std::wstring AppSecInc::Formatter::FormatMessage ( wchar_t *  fmt,
  ... 
)

format a message with a list of arguments (printf-style)

std::string AppSecInc::Formatter::FormatMessage ( char *  fmt,
  ... 
)

format a message with a list of arguments (printf-style)

std::string AppSecInc::Formatter::FormatMessageFromHRA ( HRESULT  hr)

format an ANSI message from an HRESULT

std::wstring AppSecInc::Formatter::FormatMessageFromHRW ( HRESULT  hr)

format a UNICODE message from an HRESULT

std::string AppSecInc::Formatter::FormatMessageFromLastErrorCodeA ( DWORD  errorCode)

format an ANSI message from a Win32 error code

std::wstring AppSecInc::Formatter::FormatMessageFromLastErrorCodeW ( DWORD  errorCode)

format a UNICODE message from a Win32 error code

std::string AppSecInc::Formatter::FormatMessageFromVArgs ( char *  fmt,
va_list &  args 
)

format a message with a list of arguments (printf-style)

std::wstring AppSecInc::Formatter::FormatMessageFromVArgs ( wchar_t *  fmt,
va_list &  args 
)

format a message with a list of arguments (printf-style)

std::wstring AppSecInc::Formatter::FormatTemplate ( const std::wstring &  buffer,
const std::map< std::wstring, std::wstring > &  tokens,
const std::wstring &  left = L"[",
const std::wstring &  right = L"]" 
)

format a UNICODE template

std::string AppSecInc::Formatter::FormatTemplate ( const std::string &  buffer,
const std::map< std::string, std::string > &  tokens,
const std::string &  left = "[",
const std::string &  right = "]" 
)

format an ANSI template



© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com