Please fill out the below information:
- Your Windows build number: (Type
ver at a Windows Command Prompt)
Microsoft Windows [Version 10.0.17134.228]
- What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)
Start a lengthy WSL process (e.g. sleep 120)
Find the PID in task manager
OpenProcess that PID with PROCESS_QUERY_LIMITED_INFORMATION
Call QueryFullProcessImageName on the handle, with flags == 0
- What's wrong / what should be happening instead:
QueryFullProcessImageName returns error 31 - "A device attached to the system is not functioning."
I can understand this might be by design as I am passing in flags == 0 ("The name should use the Win32 path format.") . The function does succeed with flags == 1 ("The name should use the native system path format.") and the path returned is in NT format (e.g. \Device\HarddiskVolume3\Users\Alex\AppData\Local\lxss\rootfs\bin\cat)
Another way of seeing this issue is to use the sysinternals ProcessExplorer to look at the path of the process. I assume it uses the function as above.

Could you clarify the desired behaviour. If by design the error code could be better, or better documented
Please fill out the below information:
verat a Windows Command Prompt)Microsoft Windows [Version 10.0.17134.228]
Start a lengthy WSL process (e.g.
sleep 120)Find the PID in task manager
OpenProcess that PID with PROCESS_QUERY_LIMITED_INFORMATION
Call QueryFullProcessImageName on the handle, with flags == 0
QueryFullProcessImageName returns error 31 - "A device attached to the system is not functioning."
I can understand this might be by design as I am passing in flags == 0 ("The name should use the Win32 path format.") . The function does succeed with flags == 1 ("The name should use the native system path format.") and the path returned is in NT format (e.g. \Device\HarddiskVolume3\Users\Alex\AppData\Local\lxss\rootfs\bin\cat)
Another way of seeing this issue is to use the sysinternals ProcessExplorer to look at the path of the process. I assume it uses the function as above.
Could you clarify the desired behaviour. If by design the error code could be better, or better documented