首次提交

This commit is contained in:
MoeGrid
2026-07-31 15:39:45 +08:00
commit feef2db6ac
32 changed files with 3447 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#pragma once
#include <string>
#include <cstdint>
#include <windows.h>
namespace utils {
// 将NTSTATUS转换为0x%08X格式的字符串
std::string ntstatus_str(NTSTATUS status);
// 将十六进制字符串转换为字节数组
bool hex_to_bytes(const std::string &hex, uint8_t *out, size_t len);
// 规范化路径:将/转换为\,不翻倍反斜杠
std::wstring normalize_path(const std::wstring &path);
// 将wstring转为string
std::string wstr_to_str(const std::wstring &ws);
// 将UTF-8 char*字符串转为wstring
std::wstring to_wstring(const char *s);
// 将string转为wstring(UTF-8)
std::wstring to_wstring(const std::string &s);
// 将字节数组格式化为十六进制小写字符串
std::string bytes_to_hex(const uint8_t *data, size_t len);
}