If the target process is a WoW64 process, NtQueryInformationProcess(ProcessBasicInformation) is skipped and process.parent is not set. However, NtQueryInformationProcess(ProcessBasicInformation) actually works fine for WoW64 processes, at least for the InheritedFromUniqueProcessId part.
Simply moving this NtQueryInformationProcess out of the if guard seems to solve the problem. If needed, I can make a PR for this change.
https://github.com/GuillaumeGomez/sysinfo/blob/1f17db7428fb568a2c3af803fc3d550dd924b5b3/src/windows/process.rs#L805-L829
If the target process is a WoW64 process,
NtQueryInformationProcess(ProcessBasicInformation)
is skipped andprocess.parent
is not set. However,NtQueryInformationProcess(ProcessBasicInformation)
actually works fine for WoW64 processes, at least for theInheritedFromUniqueProcessId
part.Simply moving this
NtQueryInformationProcess
out of the if guard seems to solve the problem. If needed, I can make a PR for this change.OS: Windows 24H2 26100.1000
sysinfo: 0.30.13