src/Common/String/Formatter.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 namespace AppSecInc
00004 {
00006         namespace Formatter
00007         {
00009         std::string FormatMessageFromHRA(HRESULT hr);
00011         std::string FormatMessageFromLastErrorCodeA(DWORD);
00013         std::wstring FormatMessageFromHRW(HRESULT hr);
00015         std::wstring FormatMessageFromLastErrorCodeW(DWORD);
00017         std::string FormatMessageFromVArgs(char *, va_list&);
00019         std::wstring FormatMessageFromVArgs(wchar_t *, va_list&);
00021                 std::string FormatMessage(char *, ...);
00023                 std::wstring FormatMessage(wchar_t *, ...);
00025         std::string FormatHexA(byte * buffer, unsigned long len);
00027                 std::wstring FormatHexW(byte * buffer, unsigned long len);
00029         std::string FormatHexStringA(byte * buffer, unsigned long len);
00031                 std::wstring FormatHexStringW(byte * buffer, unsigned long len);
00033         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"]");
00035         std::string FormatTemplate(const std::string& buffer, const std::map<std::string, std::string>& tokens, const std::string& left = "[", const std::string& right = "]");
00036         }
00037 }


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