Skip to content

Commit 361f267

Browse files
committed
fix attempt 3
1 parent a7b6fe7 commit 361f267

1 file changed

Lines changed: 3 additions & 26 deletions

File tree

src/vmaware.hpp

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@
114114
#error "VMAware only supports C++11 or above, set your compiler flag to '-std=c++20' for gcc/clang, or '/std:c++20' for MSVC"
115115
#endif
116116

117-
#if (WINVER == 0x0501) // Windows XP, 0x0701 for Windows 7
117+
// unused for now, maybe in the future idk
118+
#if (WINVER == 0x0501) // Windows XP, (0x0701 for Windows 7)
118119
#define WIN_XP 1
119120
#else
120121
#define WIN_XP 0
@@ -1503,30 +1504,6 @@ struct VM {
15031504

15041505
return number; // in GB
15051506
#elif (MSVC)
1506-
#if (WIN_XP)
1507-
auto IsWindowsVistaOrGreaterLambda = []() -> {
1508-
OSVERSIONINFOEX osvi;
1509-
DWORDLONG dwlConditionMask = 0;
1510-
1511-
// Initialize the OSVERSIONINFOEX structure.
1512-
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
1513-
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
1514-
osvi.dwMajorVersion = 6; // Major version for Windows Vista
1515-
osvi.dwMinorVersion = 0; // Minor version for Windows Vista
1516-
1517-
// Initialize the condition mask.
1518-
dwlConditionMask = VerSetConditionMask(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
1519-
dwlConditionMask = VerSetConditionMask(dwlConditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
1520-
1521-
// Perform the version check.
1522-
return VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION, dwlConditionMask);
1523-
};
1524-
1525-
if (!IsWindowsVistaOrGreaterLambda()) {
1526-
return 0;
1527-
}
1528-
#endif
1529-
15301507
if (!IsWindowsVistaOrGreater()) {
15311508
return 0;
15321509
}
@@ -9149,7 +9126,7 @@ struct VM {
91499126
// by the ANY.RUN minifilter driver.
91509127
// To patch this detection, I would recommend returning STATUS_OBJECT_NAME_NOT_FOUND
91519128
// that is a standard status code for this situation.
9152-
if (status == STATUS_NO_SUCH_FILE)
9129+
if (status == 0xC000000F) // STATUS_NOT_SUCH_FILE
91539130
return core::add(ANYRUN);
91549131

91559132
// Not actually the case, maybe conflict with other software installation.

0 commit comments

Comments
 (0)