Edit Shell32.dll

  • Thread starter Thread starter A-Design
  • Start date Start date
A

A-Design

Hi,
Is it possible to add some Icons in to Shell32.dll file ?
Thanks in advance.
Afshin.
 
That is a lot of work! Why not just add a folder called Icons in your
System32 folder and store them all there. It is significantly easier!
 
Thanks for reply

That is a lot of work! Why not just add a folder called Icons in your
System32 folder and store them all there. It is significantly easier!
 
Is it possible to add some Icons in to Shell32.dll file ?
Why not just add a folder called Icons in your System32 folder and store
them all there.

You could also build your own dll containing your icons, which is much safer
than editing the shell32.dll file, you'll need Visual C++ to do that, but
you might be able to do it with a trial, or with the free Visual C++ 2005
Express: http://lab.msdn.microsoft.com/express/
This solution would require some more work than a simple folder with .ico
files, but has the advantage of being a clean single file.

You actually don't need any programming knowledge to do it, as the .dll will
not contain any code (only 1 line needed to make it possible to be loaded).
I have a sample skeleton project to do that for Windows Mobile at
http://www.phm.lu/Products/PocketPC/Launcher/#IconsLib, just let me know if
you need the same for Windows XP.
 
A-Design said:
Is it possible to be done by Visual Basic ?
How come Microsoft doesn't update this file "shell32" with more and new
icons ?

Make a copy of shell32.dll, import it into Microangelo's Librarian, edit any
existing shell32 icons into whatever you want, save, exit, replace the real
shell32.dll with your modified copy. Works for me :^)
 
Make a copy of shell32.dll, import it into Microangelo's Librarian, edit
any
existing shell32 icons into whatever you want, save, exit, replace the
real
shell32.dll with your modified copy. Works for me :^)

That has several dangerous dissadvantages:
- Shell32.dll might contain some other resources or actual code that might
be somehow modified during the edition, remember that file is used by the
Windows shell, non working shell32.dll might means a non working Windows (or
some features of the explorer not working at least).
- You're modifying a file that might be patched by Windows Update, imagine
the file you have modified contains everything to work, but is structured a
bit differently inside, what happens when we patch only a part of that file
(like a path needs to replace the byte 12545 to 0xF2) ? you might have a
patch writing into a resource or other piece of code because the file is not
what it expected to be and break it (I guess Microsoft checks the file
before patching, but wouldn't take the chance of breaking my system to test
it).
- If the whole file is replaced by a newer one by a patch, you lose your
modified icons.

Now a solution would be to modify a renamed copy of shell32.dll like
myiconslib.dll, then you can basically replace the icons inside it and not
worry about other resources, but this again has several dissadvantages:
- You're wasting space for other resources and code included in that file
that you're not using (and that's not only disk space, as it loads in RAM as
soon as it needs to load an icon from it).
- You have to follow the organisation of the icons that Microsoft used in
shell32.dll, which makes it hard to insert an icon between two other ones
when you wan to keep things organized inside.

So I still think the best is a folder with .ico files, or for better
organisation, a clean .dll containing icons related to each other (like a
theme) but no other resources from editing hacks.

Just to show how easy it is from a starting skeleton project with Visual
C++, here are the step by step instructions to add an icon to the starting
project I did for Windows Mobile:
---------------->
To insert or import icons, right-click the "IconsLib resources" item in the
ResourceView pane and
select Insert... or Import...
Note that to support different sized and colors depths, you should NOT
create a new icon for each,
but instead insert a new image in the existing icon (using the menu with the
same name).

Once your library is ready, complete the version information in the
VS_VERSION_INFO (still from
the ResourceView pane) and Build it.
<----------------
As I said, I think anyone can do it, even without any programming knowledge,
and it gives you a clean custom "icon library" dll.
 
Philippe,

Thank you for your complete answer...
I think you are the best person that can answer my next question as well.
How come Microsoft didn't put all icons in a separate file? then they could
link shell32 to that file and load the icons whenever it needs to be read
there could be a procedure to specify which icon is being used in computer
and load those icons in to the memory (not all of them).
Could you please explain me a little about this?

Thanks again,
Afshin.
 
I think you are the best person that can answer my next question as well.
How come Microsoft didn't put all icons in a separate file? then they
could link shell32 to that file and load the icons whenever it needs to be
read there could be a procedure to specify which icon is being used in
computer and load those icons in to the memory (not all of them).
Could you please explain me a little about this?

I think separate files would actually be slower and consuming more memory.
It doesn't really load the whole DLL at once, I think resources are loaded
when needed by some KB chunks, so it would load the needed icons and some
around them.
Working with dlls have other organisation advantages, for exemple you can
number the icons any way you want, and they use that to automatically find
some icons... like drive types are numbered, by storing icons with the same
order in the dll, they can say something like drive_icon_index = (drive_type
+ base_drive_icon_index) and directly load the correct icon.

It might also be to prevent people from breaking their system, most people
are more comfortable messing up .ico files than .dll ones.

All in all, I really don't recommand changing the file itself, that's one of
the reason I coded the PHM Plus! for Windows XP utilties pack, as it can
change the icon the shell uses for about anything (folders, files, drives,
system items, ...) using hidden but standard features of the operating
system itself (no hack, it's just providing extra customization information
to your system).
Give it a try and let me know if you find anything missing.
 
You can make your own dll file for icons by using Axialis Icon
Workshop. Perhaps other icon-making programs have a create-dll
function, too.



In the last exciting episode on Thu, 2 Dec 2004 22:51:12 +0100,
"Philippe Majerus, MS-MVP Mobile Devices" <Use:
http://www.majerus.net/ContactUs/EMail.aspx?to=phm> wrote:

|>> Is it possible to add some Icons in to Shell32.dll file ?
|> Why not just add a folder called Icons in your System32 folder and store
|> them all there.
|
|You could also build your own dll containing your icons, which is much safer
|than editing the shell32.dll file, you'll need Visual C++ to do that, but
|you might be able to do it with a trial, or with the free Visual C++ 2005
|Express: http://lab.msdn.microsoft.com/express/
|This solution would require some more work than a simple folder with .ico
|files, but has the advantage of being a clean single file.
|
|You actually don't need any programming knowledge to do it, as the .dll will
|not contain any code (only 1 line needed to make it possible to be loaded).
|I have a sample skeleton project to do that for Windows Mobile at
|http://www.phm.lu/Products/PocketPC/Launcher/#IconsLib, just let me know if
|you need the same for Windows XP.

<*((((><{
(e-mail address removed)
 
Back
Top