3 #include "../Include/Winheaders.h"
17 BLACKBONE_API
static std::wstring
UTF8ToWstring(
const std::string& str );
24 BLACKBONE_API
static std::string
WstringToUTF8(
const std::wstring& str );
32 BLACKBONE_API
static std::wstring
AnsiToWstring(
const std::string& input, DWORD locale = CP_ACP );
40 BLACKBONE_API
static std::string
WstringToAnsi(
const std::wstring& input, DWORD locale = CP_ACP );
48 BLACKBONE_API
static std::wstring
FormatString(
const wchar_t* fmt, ... );
55 BLACKBONE_API
static std::wstring
StripPath(
const std::wstring& path );
62 BLACKBONE_API
static std::wstring
GetParent(
const std::wstring& path );
75 BLACKBONE_API
static std::wstring
ToLower(
const std::wstring& str );
82 BLACKBONE_API
static std::wstring
RandomANString(
int length = 0 );
96 BLACKBONE_API
static bool FileExists(
const std::wstring& path );
108 InitializeCriticalSection( &_native );
113 DeleteCriticalSection( &_native );
116 BLACKBONE_API
void lock()
118 EnterCriticalSection( &_native );
121 BLACKBONE_API
void unlock()
123 LeaveCriticalSection( &_native );
127 CRITICAL_SECTION _native;
143 BLACKBONE_API ~CSLock()
149 CSLock(
const CSLock& ) =
delete;
150 CSLock& operator = (
const CSLock& ) =
delete;
static BLACKBONE_API std::wstring ToLower(const std::wstring &str)
Cast string characters to lower case
Definition: Utils.cpp:162
std::lock_guard alternative
Definition: Utils.h:134
static BLACKBONE_API std::wstring AnsiToWstring(const std::string &input, DWORD locale=CP_ACP)
Convert ANSI string to wide char one
Definition: Utils.cpp:37
static BLACKBONE_API bool FileExists(const std::wstring &path)
Check if file exists
Definition: Utils.cpp:202
static BLACKBONE_API std::wstring GetParent(const std::wstring &path)
Get parent directory
Definition: Utils.cpp:101
static BLACKBONE_API std::wstring FormatString(const wchar_t *fmt,...)
Format string
Definition: Utils.cpp:63
static BLACKBONE_API std::wstring GetErrorDescription(NTSTATUS code)
Get system error description
Definition: Utils.cpp:175
static BLACKBONE_API std::string WstringToAnsi(const std::wstring &input, DWORD locale=CP_ACP)
Convert wide char string to ANSI one
Definition: Utils.cpp:50
static BLACKBONE_API std::string WstringToUTF8(const std::wstring &str)
Convert wide string to UTF-8
Definition: Utils.cpp:26
std::mutex alternative
Definition: Utils.h:103
static BLACKBONE_API std::wstring UTF8ToWstring(const std::string &str)
Convert UTF-8 string to wide char one
Definition: Utils.cpp:16
static BLACKBONE_API std::wstring RandomANString(int length=0)
Generate random alpha-numeric string
Definition: Utils.cpp:139
static BLACKBONE_API std::wstring GetExeDirectory()
Get current process exe file directory
Definition: Utils.cpp:120
static BLACKBONE_API std::wstring StripPath(const std::wstring &path)
Get filename from full-qualified path
Definition: Utils.cpp:81
Definition: AsmHelper32.cpp:6