Skip to content

Fix LONG instead of LRESULT return in winuser.d#22583

Merged
dkorpel merged 1 commit intodlang:stablefrom
dkorpel:windows-header-lresult
Feb 20, 2026
Merged

Fix LONG instead of LRESULT return in winuser.d#22583
dkorpel merged 1 commit intodlang:stablefrom
dkorpel:windows-header-lresult

Conversation

@dkorpel
Copy link
Contributor

@dkorpel dkorpel commented Feb 17, 2026

These functions are supposed to return a long on 64-bit, while a LONG is always 32-bit on Windows.

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-dispatchmessagew
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-senddlgitemmessagew

Found by LDC when using custom headers:

Error: Function type does not match previously declared function with the same mangled name: `DispatchMessageW`
        Previous IR type: i32 (ptr)
        New IR type:      i64 (ptr)

@dkorpel dkorpel added OS:Windows Druntime Specific to druntime labels Feb 17, 2026
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @dkorpel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#22583"

@dkorpel dkorpel merged commit 75e04f4 into dlang:stable Feb 20, 2026
77 of 78 checks passed
@dkorpel dkorpel deleted the windows-header-lresult branch February 20, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Druntime Specific to druntime OS:Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants