- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to extract icon resources from DLL's such as SHELL32.DLL (and any other executable) so that I can paste and edit them using the Visual Studio Resource editor?
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use the following hack (it is useful also for toolbar buttons, splash screens, etc.):
1) In Tools/File types/Advanced/Change icon... dialog, select the DLL from
you want the icon(s) extracted (e.g. for toolbar buttons, just run the application you want to "hack")
2) Press a PrintScreen or Alt+PrintScreen, grabbing the screen
3) Open a blank picture in Paint, and paste the screen shot
4) Select & copy the region of interest and paste it into VS resource editor.
Also, there are freeware/shareware utilities (I have "Resource-grabber") which are able to dump all resources from an exe/dll into a folder, exporting resources in the right format (.ico, .cur, .bmp).
Jugoslav
1) In Tools/File types/Advanced/Change icon... dialog, select the DLL from
you want the icon(s) extracted (e.g. for toolbar buttons, just run the application you want to "hack")
2) Press a PrintScreen or Alt+PrintScreen, grabbing the screen
3) Open a blank picture in Paint, and paste the screen shot
4) Select & copy the region of interest and paste it into VS resource editor.
Also, there are freeware/shareware utilities (I have "Resource-grabber") which are able to dump all resources from an exe/dll into a folder, exporting resources in the right format (.ico, .cur, .bmp).
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use the following hack (it is useful also for toolbar buttons, splash screens, etc.):
1) In Tools/File types/Advanced/Change icon... dialog, select the DLL from
you want the icon(s) extracted (e.g. for toolbar buttons, just run the application you want to "hack")
2) Press a PrintScreen or Alt+PrintScreen, grabbing the screen
3) Open a blank picture in Paint, and paste the screen shot
4) Select & copy the region of interest and paste it into VS resource editor.
Also, there are freeware/shareware utilities (I have "Resource-grabber") which are able to dump all resources from an exe/dll into a folder, exporting resources in the right format (.ico, .cur, .bmp).
Jugoslav
1) In Tools/File types/Advanced/Change icon... dialog, select the DLL from
you want the icon(s) extracted (e.g. for toolbar buttons, just run the application you want to "hack")
2) Press a PrintScreen or Alt+PrintScreen, grabbing the screen
3) Open a blank picture in Paint, and paste the screen shot
4) Select & copy the region of interest and paste it into VS resource editor.
Also, there are freeware/shareware utilities (I have "Resource-grabber") which are able to dump all resources from an exe/dll into a folder, exporting resources in the right format (.ico, .cur, .bmp).
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Double post is not my fault -- I hit "Edit" button after I had realized that the numbered paragraphs will get screwed. Instead, the fixed version also got screwed and the first one appeared anyway. I think I'll revert to "Back" in my browser.
Jugoslav
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve and Jugoslav for your help. 'Resource grabber' looks pretty good and the evaluation version ran ok on my Win NT system. If I can find a way of getting the payment in $US cash from here in the UK to the shareware vendor, I will be in business. I remain curious as to how to recognise icon data in a binary file - I have run DUMPBIN on SHELL32.DLL to get a list of members and it gives .rsrc as a member (along with its starting address), which I guess is where the resources are held. If I want to extract the resources myself, I need to know how the icon data is stored (disguised?)- where it begins and where it ends- so that I can recognise it. Any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's not necessary to use such low-level hacks as parsing the executable and extracting resources -- there are Win32 APIs which let you do that. Take a look, for example, at EnumResources, EnumResourceTypes, then FindResource, LoadResource, LockResource Win32 functions. With dlls, it's
piece of cake (since they can be loaded directly into "grabber's" address space using LoadLibrary). However, it seems that the Resource-grabber and MS's ExeView use just the technique you described -- "parse" the executable and extract the resources. See for example
http://support.microsoft.com/support/kb/articles/Q81/3/36.ASP
http://support.microsoft.com/support/kb/articles/Q70/0/73.ASP
Regards
Jugoslav
piece of cake (since they can be loaded directly into "grabber's" address space using LoadLibrary). However, it seems that the Resource-grabber and MS's ExeView use just the technique you described -- "parse" the executable and extract the resources. See for example
http://support.microsoft.com/support/kb/articles/Q81/3/36.ASP
http://support.microsoft.com/support/kb/articles/Q70/0/73.ASP
Regards
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks again, Jugoslav. Your pointer to EXEVIEW was welcome until I discovered that the download was a self-extracting file which yielded uncompiled C-code which I cannot use and which requires access to windows.h, commdlg.h and memory.h, none of which I have. Nice try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe I missed the idea, but why not just use File | Open and navigate to the c:winntsystem32 folder (or whatever) and choose shell32.dll (or some other file with resources) and in the 'Open as' dropdown select Resources (and feel free to choose 'Open as read-only' if you like). Then select an icon, copy it, and paste it into your project's resource script. It works for me (and it's easier to do than to explain!)
So, did I miss something, or is this OK?
-John
So, did I miss something, or is this OK?
-John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks, John, for pointing me to this capability that MS Dev Studio has
that I was unaware of. I opened SHELL32.DLL as 'resources' and all of its
resources were displayed in the resource panel.
that I was unaware of. I opened SHELL32.DLL as 'resources' and all of its
resources were displayed in the resource panel.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page