Skip to content

Conversation

@shinokaro
Copy link
Collaborator

This pull request introduces a Ruby-based implementation of the previously C-based edicon.exe. Opting for a Ruby reimplement over fixing the existing C code will shorten the build times and make maintenance easier, leveraging widely accessible Microsoft documentation.

Reference Information:
The original edicon.c contained several issues that are being addressed by this reimplementation:

  • BeginUpdateResource was incorrectly compared to INVALID_HANDLE_VALUE. Proper error checking requires comparison to NULL.(
    if (h == INVALID_HANDLE_VALUE)
    )
  • The calculation of GroupIconSize was incorrect. It should have been calculated using the size of IconDirResEntry multiplied by the number of images, instead of using IconDirectoryEntry.(
    DWORD GroupIconSize = sizeof(GroupIcon) + header->ImageCount * sizeof(IconDirectoryEntry);
    )

This reimplement ensures that the functionality of EdIcon is preserved while simplifying future enhancements and maintenance.

This pull request introduces a Ruby-based implementation of the previously C-based `edicon.exe`. Opting for a Ruby reimplement over fixing the existing C code will shorten the build times and make maintenance easier, leveraging widely accessible Microsoft documentation.

Reference Information:
The original `edicon.c` contained several issues that are being addressed by this reimplementation:

- `BeginUpdateResource` was incorrectly compared to `INVALID_HANDLE_VALUE`. Proper error checking requires comparison to `NULL`.
- The calculation of `GroupIconSize` was incorrect. It should have been calculated using the size of `IconDirResEntry` multiplied by the number of images, instead of using `IconDirectoryEntry`.
This reimplement ensures that the functionality of `EdIcon` is preserved while simplifying future enhancements and maintenance.
@shinokaro shinokaro force-pushed the migrate-edicon-to-ruby branch from 23b6597 to 4084207 Compare August 9, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants