Hello guys, today i'm here to ask you a simple question about listing all processes ids in wdd, the problem is that i can't obtain the currentPID of the currentProcess, showing just some rand values and then zeroes, so please I'm literally stucked in these lines of code and idk how to get out of it, if you could explain me what am i doing wrong.
Thank you
PEPROCESS currentProcess = PsGetCurrentProcess();
PLIST_ENTRY currentLink = (unsigned char *)currentProcess + ACTIVE_PROCESS_LINK_OFFS64;
HANDLE *currentPID;
do {
currentLink = currentLink->Flink;
currentProcess = (PEPROCESS)((unsigned char *)currentLink - ACTIVE_PROCESS_LINK_OFFS64); //2f0
currentPID = ((HANDLE*)currentLink - 0x8);
i++;
KdPrint(("Current PID: %d", currentPID));
} while (currentProcess != PsGetCurrentProcess());
Thank you
PEPROCESS currentProcess = PsGetCurrentProcess();
PLIST_ENTRY currentLink = (unsigned char *)currentProcess + ACTIVE_PROCESS_LINK_OFFS64;
HANDLE *currentPID;
do {
currentLink = currentLink->Flink;
currentProcess = (PEPROCESS)((unsigned char *)currentLink - ACTIVE_PROCESS_LINK_OFFS64); //2f0
currentPID = ((HANDLE*)currentLink - 0x8);
i++;
KdPrint(("Current PID: %d", currentPID));
} while (currentProcess != PsGetCurrentProcess());