title: Getting file path from handle
body: <p>I'm trying to get a running program's full path, I'm currently using this code </p>
  
  <pre><code>process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
  char phew[MAX_PATH + 1];
  GetFinalPathNameByHandle(process, phew, MAX_PATH, FILE_NAME_OPENED);
  
  TRACE("Path : %s\n", phew);
  </code></pre>
  
  <p>but that always returns and empty string. I need a result like C:\Program\File.exe. I couldn't find any other help for WinAPI elsewhere.</p>