mirror of
https://github.com/HolographicHat/Yae.git
synced 2026-03-20 19:39:47 +08:00
update
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
#include "pch.h"
|
||||
#include "util.h"
|
||||
|
||||
#pragma region StringConvert
|
||||
|
||||
string IlStringToString(Il2CppString* str, UINT codePage) {
|
||||
auto chars = reinterpret_cast<const wchar_t*>(str->chars);
|
||||
auto len = WideCharToMultiByte(codePage, 0, chars, -1, nullptr, 0, nullptr, nullptr);
|
||||
auto buffer = new char[len];
|
||||
WideCharToMultiByte(codePage, 0, chars, -1, buffer, len, nullptr, nullptr);
|
||||
return string(buffer);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region ByteUtils
|
||||
bool IsLittleEndian() {
|
||||
UINT i = 1;
|
||||
char* c = (char*)&i;
|
||||
return (*c);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
#pragma region FindMainWindowByPID
|
||||
|
||||
struct HandleData {
|
||||
|
||||
Reference in New Issue
Block a user