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 );
47 BLACKBONE_API
static std::wstring
StripPath(
const std::wstring& path );
54 BLACKBONE_API
static std::wstring
GetParent(
const std::wstring& path );
67 BLACKBONE_API
static std::wstring
ToLower(
const std::wstring& str );
74 BLACKBONE_API
static std::wstring
RandomANString(
int length = 0 );
88 BLACKBONE_API
static bool FileExists(
const std::wstring& path );
100 InitializeCriticalSection( &_native );
105 DeleteCriticalSection( &_native );
108 BLACKBONE_API
void lock()
110 EnterCriticalSection( &_native );
113 BLACKBONE_API
void unlock()
115 LeaveCriticalSection( &_native );
119 CRITICAL_SECTION _native;
135 BLACKBONE_API ~CSLock()
141 CSLock(
const CSLock& ) =
delete;
142 CSLock& operator = (
const CSLock& ) =
delete;
static BLACKBONE_API std::wstring ToLower(const std::wstring &str)
Cast string characters to lower case
Definition: Utils.cpp:141
std::lock_guard alternative
Definition: Utils.h:126
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:181
static BLACKBONE_API std::wstring GetParent(const std::wstring &path)
Get parent directory
Definition: Utils.cpp:82
static BLACKBONE_API std::wstring GetErrorDescription(NTSTATUS code)
Get system error description
Definition: Utils.cpp:154
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:95
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:118
static BLACKBONE_API std::wstring GetExeDirectory()
Get current process exe file directory
Definition: Utils.cpp:101
static BLACKBONE_API std::wstring StripPath(const std::wstring &path)
Get filename from full-qualified path
Definition: Utils.cpp:62
Definition: AsmHelper32.cpp:6