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

HtmlHelp.h should use hhctrl.ocx not htmlhelp.dll #1749

Closed
elachlan opened this issue Dec 2, 2023 · 3 comments · Fixed by #1752
Closed

HtmlHelp.h should use hhctrl.ocx not htmlhelp.dll #1749

elachlan opened this issue Dec 2, 2023 · 3 comments · Fixed by #1752
Labels
broken api An API is inaccurate and could lead to runtime failure

Comments

@elachlan
Copy link
Contributor

elachlan commented Dec 2, 2023

We ran into an error in winforms Unable to load DLL "htmlhelp.dll".
dotnet/winforms#10410

This is the PInvoke generated using CsWin32/Win32metadata

[DllImport("htmlhelp.dll", ExactSpelling = true, EntryPoint = "HtmlHelpW")]
static extern winmdroot.Foundation.HWND LocalExternFunction(winmdroot.Foundation.HWND hwndCaller, winmdroot.Foundation.PCWSTR pszFile, uint uCommand, nuint dwData);

This is the code pulled from ILSpy:

[DllImport("htmlhelp.dll", ExactSpelling = true, PreserveSig = false)]
[Unicode]
[Documentation("https://learn.microsoft.com/windows/win32/api/htmlhelp/nf-htmlhelp-htmlhelpw")]
public static extern HWND HtmlHelpW([Optional][In] HWND hwndCaller, [In][Const] PWSTR pszFile, [In][AssociatedEnum("HTML_HELP_COMMAND")] uint uCommand, [In] UIntPtr dwData);

It should probably point to hhctrl.ocx not htmlhelp.dll.

HtmlHelpA=htmlhelp.dll
HtmlHelpW=htmlhelp.dll

Related: #1345

@elachlan
Copy link
Contributor Author

elachlan commented Dec 2, 2023

CC: @Tanya-Solyanik

@riverar
Copy link
Collaborator

riverar commented Dec 2, 2023

Thanks, we'll get that patched up.

@riverar riverar added the broken api An API is inaccurate and could lead to runtime failure label Dec 2, 2023
@Tanya-Solyanik
Copy link
Member

Tanya-Solyanik commented Dec 7, 2023

@mikebattista @riverar - When are you planning to do a release with these changes? WInforms has to either revert the change that introduced this issue or to pick up the updated metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broken api An API is inaccurate and could lead to runtime failure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants