mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
Processes: don't hard code magic numbers (Windows)
This commit is contained in:
@@ -5,6 +5,7 @@ extern "C" {
|
||||
|
||||
#ifdef FF_USE_WIN_NTAPI
|
||||
|
||||
#include <ntstatus.h>
|
||||
#include <winternl.h>
|
||||
|
||||
uint32_t ffDetectProcesses(FFinstance* instance, FFstrbuf* error)
|
||||
@@ -12,7 +13,7 @@ uint32_t ffDetectProcesses(FFinstance* instance, FFstrbuf* error)
|
||||
FF_UNUSED(instance);
|
||||
|
||||
ULONG size = 0;
|
||||
if(NtQuerySystemInformation(SystemProcessInformation, nullptr, 0, &size) != (NTSTATUS)0xC0000004 /*STATUS_INFO_LENGTH_MISMATCH*/)
|
||||
if(NtQuerySystemInformation(SystemProcessInformation, nullptr, 0, &size) != STATUS_INFO_LENGTH_MISMATCH)
|
||||
{
|
||||
ffStrbufAppendS(error, "NtQuerySystemInformation(SystemProcessInformation, NULL) failed");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user