Is there a way to get an associated icon in C# without using any DllImports?
When I use Icon.ExtractAssociatedIcon I don't seem to get the icon for drives, folders, SpecialFolder's in Environment or any files on network attached folders. So is there any other way to get an icon using .NET?
.Net have only one method for extracting associated icons, and you already mentioned about it. Every lib you can find uses pinvokes, because they get icons from windows. So if you need to fully portable icon extraction engine, you must write it by yourself, sadly, but this is the only way (and hide all system specific code inside).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With