Relative Content

Tag Archive for c++windowswinapi

PID of notepad.exe in taskmanager different from pi.dwProcessId

I’m new to C and am working with the Win32 API to create a process with CreateProcessW(). This is my first C program. It opens notepad.exe and outputs the process ID using dwProcessId. But the PID that is outputted is always different from the PID of the open notepad.exe process I see in Task Manager. Why is this?