Skip to content

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