Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call Correct HtmlHelp Overload #12511

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Call Correct HtmlHelp Overload #12511

merged 1 commit into from
Nov 20, 2024

Conversation

lonitra
Copy link
Member

@lonitra lonitra commented Nov 19, 2024

Fixes #12505

In .NET 8 when calling Help.ShowHelp with a .chm file and an integer ID for the Topic ID, we would call HtmlHelp overload with cast to IntPtr, taking the integer ID as is. In .NET 9 after updating to use cswin32, we updated to call the wrong overload where instead of taking the integer ID as is, we would take its address, causing the help page to fail to show because topic ID doesn't exist. Tested changes manually to confirm fix. There is not a good way to unit test this it seems as Help.ShowHelp returns void.

Microsoft Reviewers: Open in CodeFlow

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 75.73892%. Comparing base (ddfbcd1) to head (f23ac13).
Report is 6 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #12511         +/-   ##
===================================================
- Coverage   75.74927%   75.73892%   -0.01036%     
===================================================
  Files           3156        3157          +1     
  Lines         636084      636097         +13     
  Branches       47001       47002          +1     
===================================================
- Hits          481829      481773         -56     
- Misses        150787      150861         +74     
+ Partials        3468        3463          -5     
Flag Coverage Δ
Debug 75.73892% <0.00000%> (-0.01036%) ⬇️
integration 18.17469% <0.00000%> (-0.03401%) ⬇️
production 49.30322% <0.00000%> (-0.02326%) ⬇️
test 97.04530% <ø> (-0.00129%) ⬇️
unit 46.51646% <0.00000%> (-0.01731%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

---- 🚨 Try these New Features:

@lonitra lonitra merged commit 0fb2ac7 into dotnet:main Nov 20, 2024
8 checks passed
@lonitra
Copy link
Member Author

lonitra commented Nov 20, 2024

/backport to release/9.0

@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview1 milestone Nov 20, 2024
Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/winforms/actions/runs/11941857110

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.

Help.ShowHelp does not launch if TopicId provided - .NET 9
2 participants