Skip to content

Drop support for loading icons from a resource id (icons with a negative index smaller than -1) #155

@end2endzone

Description

@end2endzone

Is your feature request related to a problem? Please describe.
Icons on Windows can be specified with either an icon index (positive values) or from a resource id. Resource ID are negative values that are smaller than -1. Usually, resource IDs are private to an application. From an application developer point of view, you assign a custom resource id to a file icon path. At compilation time, the resource compiler picks up that resource id and store the icon data within your compiled dll. However, you never know the actual index where the resource compiler will actually put your icon. It uses a sequential increasing number. So from a developer point of view, using a resource id for "getting your new file icon" is much simpler because it never changes.

However, for referencing icons from another application (such as ShellAnything), it is much simpler to specify an index instead of "trying to discover the actual resource id that was used during compilation".

The code for handling resource id vs simple icon index is cumbersome, prone to errors and hard to maintain. It could also lead to errors. This issue relates to #17 and #150.

References:

Describe the solution you'd like
It would be easier to simply drop support for file extensions that resolves to such icons.

Describe alternatives you've considered
N/A

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    code cleanupThe code needs optimizationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions