diff --git a/src/config.h b/src/config.h index f1afcef..ebff873 100644 --- a/src/config.h +++ b/src/config.h @@ -17,9 +17,9 @@ std::wstring GetIniString(const std::wstring& section, std::vector buffer(100); DWORD bytesread = 0; do { - bytesread = ::GetPrivateProfileStringW(section.c_str(), key.c_str(), - default_value.c_str(), buffer.data(), - buffer.size(), kIniPath.c_str()); + bytesread = ::GetPrivateProfileStringW( + section.c_str(), key.c_str(), default_value.c_str(), buffer.data(), + (DWORD)buffer.size(), kIniPath.c_str()); // 如果字符串过长,则倍增缓冲区大小 if (bytesread >= buffer.size() - 1) { buffer.resize(buffer.size() * 2); diff --git a/src/fastsearch.h b/src/fastsearch.h index 0395060..7e973cb 100644 --- a/src/fastsearch.h +++ b/src/fastsearch.h @@ -40,7 +40,7 @@ static const uint8_t* SundaySearch(const uint8_t* s, } } - i += skip[s[i + m]]; + i += (int)skip[s[i + m]]; } return NULL; diff --git a/src/green.h b/src/green.h index ca0667d..9adedbb 100644 --- a/src/green.h +++ b/src/green.h @@ -118,11 +118,15 @@ NET_API_STATUS WINAPI MyNetUserGetInfo(LPCWSTR servername, return ret; } +#ifndef PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON #define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON \ (0x00000001ui64 << 44) +#endif +#ifndef PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON #define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON \ (0x00000001ui64 << 28) +#endif typedef BOOL(WINAPI* pUpdateProcThreadAttribute)( LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,