shell api power

i've discovered some months ago that the shell libary shlwapi.dll has, beside some well known functions like SHBrowseForFolder also some tiny functions but very useful.
instead of writing your own functions why dont use those which already exist, especially if come from OS DLL's ?
u are sure they are working OK and also it may be faster then yours (applicatinos like Windows Explorer use the DLL already, hence the functions might already be loaded in the memory pages)

those functions stay mostly in so called "Shell Lightweight Utility Functions", and they are grouped in
String Functions,
Path Functions
Registry Functions
Color Palette Functions,
Miscellaneous

For example, i needed a function which gives a text formatted to display the size of a file like this:
100 MB
123 KB
...

this function already exists in shell lib, StrFormatByteSizeW Function or StrFormatByteSizeA Function

so I will always check out the shell functions whenever i have this kind of small tasks to do

Comments

Popular posts from this blog

IconFont2Code, my open-source tool in order to view icons in font files and create C# class with the glyph constants

Problems

Xamarin.Forms XmlnsDefinition attribute: All of your namespaces become one