Example Code

Extract Icon from resource (.dll;.exe) (Windows API Call's + .Net)

Code and Documents


Download All


This example shows how to extract icons from specified executable file, DLL, or icon file.

Icons can be extracted by Icon index inside resource file, by Icon name or with Native windows Icon Picker dialog.

Current example shows how to extract 32x32 Icons but provision to extract other sizes is provided as well. LoadImage API Call allows to obtain array pointers to large and small icons. Check for details at http://msdn.microsoft.com/en-us/default.aspx.

Steps to Complete

Provide name (for registered windows resources) or full path with icon index or name.

Additional Notes

Details on API call's can be found here: http://msdn.microsoft.com/en-us/default.aspx

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.