go-webview2 icon indicating copy to clipboard operation
go-webview2 copied to clipboard

Fix Windows 32-bit support for GetWindowLong/SetWindowLong functions

Open LowLvlGod opened this issue 4 months ago • 0 comments

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 avatar Jul 20 '25 12:07 LowLvlGod