title: Get file path from NT/Device Name
body: <p>I want to convert device path to a file path.</p>
  
  <p>I want to get process name by process id, so I am using this code</p>
  
  <pre><code>PsLookupProcessByProcessId(processId,&amp;pEProcess);
  ObOpenObjectByPointer(pEProcess,
                        OBJ_KERNEL_HANDLE,
                        NULL,
                        0,
                        NULL,
                        KernelMode,
                        &amp;hProcess);
  ObDereferenceObject (pEProcess);
  
  nts = ZwQueryInformationProcess (hProcess,27,0,0,&amp;ulSize);
  </code></pre>
  
  <p>But it gives path as <code>\Device\hardDiskVolume1\windows\system32\taskmgr.exe</code></p>
  
  <p>But I want this as a plain filename <code>C:\windows\system32\taskmgr.exe</code></p>