mirror of
https://github.com/es3n1n/defendnot.git
synced 2026-08-02 10:32:01 +00:00
feat(loader): check for wsc service before starting
This commit is contained in:
@@ -27,4 +27,10 @@ namespace shared {
|
||||
freopen_s(reinterpret_cast<FILE**>(stderr), "CONOUT$", "w", stderr);
|
||||
});
|
||||
}
|
||||
|
||||
inline bool is_winserver() {
|
||||
OSVERSIONINFOEXW osvi = {sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0, 0, VER_NT_WORKSTATION};
|
||||
const auto cond_mask = VerSetConditionMask(0, VER_PRODUCT_TYPE, VER_EQUAL);
|
||||
return !VerifyVersionInfoW(&osvi, VER_PRODUCT_TYPE, cond_mask);
|
||||
}
|
||||
} // namespace shared
|
||||
|
||||
Reference in New Issue
Block a user