[Win32] Retrieve icon for file type?

Thomas Heller thomas.heller at ion-tof.com
Wed Apr 26 18:22:29 CEST 2000


> I'm attempting to use the Windows registry to retrieve (and convert to a
> PNG/JPEG) the Windows icons for given files (so that a Windows-based
server
> can display file-type-specific icons).  I do not seem to be able to find
the
> function shellapi.ExtractIcon (
> http://msdn.microsoft.com/library/psdk/winui/icons_7h2m.htm ) in the Win32
> extensions.

You might want to look at
MEInc/Dist/icon.py in Gordon's win32 installer package.
This file uses LoadResource to extract icons from executable files.
(Note however that you get the raw data, and not an HICON).

Thomas





More information about the Python-list mailing list