Skip to content

Fix Windows 32-bit support for GetWindowLong/SetWindowLong functions #81

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LowLvlGod
Copy link

@LowLvlGod LowLvlGod commented Jul 20, 2025

Problem:

  • GetWindowLongPtrW and SetWindowLongPtrW functions don't exist on 32-bit
  • This caused runtime errors at launch for 32-bit binaries

Solution:

  • Implemented conditional compilation using Go build constraints
  • Created architecture-specific implementations:
    • w32_386.go: 32-bit implementation using GetWindowLongW/SetWindowLongW
    • w32_64bit.go: 64-bit implementation using GetWindowLongPtrW/SetWindowLongPtrW (covers amd64 and arm64)

@LowLvlGod LowLvlGod marked this pull request as draft July 21, 2025 12:15
@LowLvlGod LowLvlGod marked this pull request as ready for review July 21, 2025 12:24
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.

1 participant