fix win32 manifest ID for DLLs #22428
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Embedding manifests into .exes as covered in #17406 and #17448 totally works, but is currently using the wrong resource ID when embedding into .dlls. This change ensures that shared libs that embed manifests use the correct resource ID. See this docs page for an overview of the various kinds of resource IDs for manifests and their usage: https://learn.microsoft.com/en-us/windows/win32/sbscs/using-side-by-side-assemblies-as-a-resource
FYI @squeek502
Repro steps
Below is a simple repro that has a
lib.cbuilt as a DLL and amain.cbuilt as an .exe.lib.cis using an API (TaskDialogIndirect) that requires use of a manifest file with a specific dependency declaration (apparently done for back compat reasons).Save the contents of all these into a single directory, then build and run with:
Expected behavior should be that it pops a dialog with the contents "hello" but instead aborts with an "entry point not found" error. You may need to double-click on it via Explorer to get the error dialog to pop - on my machine it just fails silently if run from the commandline.