Skip to content

Commit 5080cdc

Browse files
author
Requiem
committed
always the same shit
1 parent d5fec75 commit 5080cdc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/vmaware.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,6 +1871,8 @@ struct VM {
18711871

18721872
// Returns a list of running process names
18731873
[[nodiscard]] static std::unordered_set<std::string> get_running_process_names() {
1874+
std::unordered_set<std::string> processNames;
1875+
#if (WINDOWS)
18741876
typedef NTSTATUS(__stdcall* PFN_NtQuerySystemInformation)(
18751877
SYSTEM_INFORMATION_CLASS,
18761878
PVOID,
@@ -1917,7 +1919,6 @@ struct VM {
19171919
return {};
19181920
}
19191921

1920-
std::unordered_set<std::string> processNames;
19211922
const BYTE* cur = buffer.data();
19221923
while (true) {
19231924
auto pi = reinterpret_cast<const SYSTEM_PROCESS_INFORMATION*>(cur);
@@ -1946,7 +1947,7 @@ struct VM {
19461947
}
19471948
cur += pi->NextEntryOffset;
19481949
}
1949-
1950+
#endif
19501951
return processNames;
19511952
}
19521953

0 commit comments

Comments
 (0)