Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Call <a href="http://msdn.microsoft.com/en-us/library/bb762179.aspx" rel="nofollow noreferrer"><code>ShGetFileInfo</code></a>. It can tell you the description (the "type name," in that function's vocabulary), and it can give you an icon handle, or a handle to the system image list, where the icon resides, or the path to the module that holds the image resource. That function can do lots of different things, so make sure to read the documentation carefully.</p> <p><a href="http://msdn.microsoft.com/en-us/library/bb761854(VS.85).aspx" rel="nofollow noreferrer">MSDN says</a> <code>ShGetFileInfo</code> "may be slow" and calls the <a href="http://msdn.microsoft.com/en-us/library/bb761854(VS.85).aspx" rel="nofollow noreferrer"><code>IExtractIcon</code></a> interface a "more flexible and efficient" alternative. But the sequence it recommends is to use an <a href="http://msdn.microsoft.com/en-us/library/bb775075.aspx" rel="nofollow noreferrer"><code>IShellFolder</code></a> interface, then call <a href="http://msdn.microsoft.com/en-us/library/bb775073.aspx" rel="nofollow noreferrer"><code>GetUIObjectOf</code></a> to get the file's <code>IExtractIcon</code> interface, and then call <a href="http://msdn.microsoft.com/en-us/library/bb761852.aspx" rel="nofollow noreferrer"><code>GetIconLocation</code></a> and <a href="http://msdn.microsoft.com/en-us/library/bb761850.aspx" rel="nofollow noreferrer"><code>Extract</code></a> on it to retrieve the icon's handle.</p> <p>For all I know, that's exactly what <code>ShGetFileInfo</code> does anyway, but it's much more cumbersome, and after you've done all that, you still wouldn't have the file's type description. Stick with <code>ShGetFileInfo</code> until speed and efficiency become a noticeable problem.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload