title: How to use SHGetFileInfo with SHGFI_PIDL in python
body: <p>I'm trying to retrieve file information (specifically info about the icon) using SHGetFileInfo. In reality, I don't have the full path of the file, I only have the pidl.</p>
  
  <p>The following code returns <code>(0L, (0, 0, 0, '', ''))</code> and my question is why.</p>
  
  <pre><code>from win32com.shell import shell, shellcon
  def get_info():
      desktop = shell.SHGetDesktopFolder()
      eaten, desktop_pidl, attr = desktop.ParseDisplayName(None, None, r"C:\Users\Ella\Desktop")
      return shell.SHGetFileInfo(desktop_pidl, 0, shellcon.SHGFI_PIDL | shellcon.SHGFI_SYSICONINDEX | shellcon.SHGFI_ICON | shellcon.SHGFI_DISPLAYNAME)
  </code></pre>
  
  <p>On the other hand, the code bellow does work for some reason (it uses full path instead of pidl):</p>
  
  <pre><code>from win32com.shell import shell, shellcon
  def get_info2():
      return shell.SHGetFileInfo(r"C:\Users\Ella\Desktop", 0, shellcon.SHGFI_SYSICONINDEX | shellcon.SHGFI_ICON | shellcon.SHGFI_DISPLAYNAME)
  </code></pre>
  
  <p>Thanks!</p>