-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathHTools.h
35 lines (24 loc) · 1.07 KB
/
HTools.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
#include <string>
#include <Ntsecapi.h>
class HTools {
public:
static std::string GetFileVersion(std::string filePath);
static BOOL FileExist(std::string file);
static std::wstring itow(int i);
static std::string w2s(std::wstring wstr);
static std::string wstring2string(std::wstring wstr);
static std::wstring s2w(std::string str);
static std::wstring string2wstring(std::string str);
static const char* u2g(std::string str);
static std::string& Replace(std::string& str, const std::string& old_value, const std::string& new_value);
static std::string Base64_Encode(const char* data, int len);
static std::string Base64_Encode(std::string str);
static std::string Base64_Decode(const char* data, int len, int& olen);
static std::string Base64_Decode(std::string data, int& olen);
static std::wstring RegReadView(HKEY root, LPCWSTR path, LPCWSTR key, DWORD type = REG_SZ);
static DWORD ReadInt(DWORD address);
static std::string ReadAsciiString(DWORD address);
static std::wstring ReadUnicodeString(DWORD address);
static HWND GetProcessWnd(DWORD pid);
};