Skip to content

fix: Windows build errors with windows crate v0.52#9

Open
Wooklae-cho wants to merge 1 commit intodirvine:mainfrom
Wooklae-cho:fix/windows-build
Open

fix: Windows build errors with windows crate v0.52#9
Wooklae-cho wants to merge 1 commit intodirvine:mainfrom
Wooklae-cho:fix/windows-build

Conversation

@Wooklae-cho
Copy link
Copy Markdown

Summary

  • Replace GetWindowText with GetWindowTextW (Unicode version)
  • Fix HWND type import in platform.rs
  • Fix enum_window_callback signature to use LPARAM and BOOL types
  • Fix EnumWindows call to use LPARAM() wrapper

Problem

Building tauri-mcp on Windows failed with the following errors:

  • GetWindowText doesn't exist in windows crate v0.52.0
  • HWND type was not in scope in enum_window_callback
  • Callback signature used wrong types (isize, i32 instead of LPARAM, BOOL)

Testing

Successfully built and installed on Windows after these changes.

Fixes #8

- Replace GetWindowText with GetWindowTextW (Unicode version)
- Fix HWND type import in platform.rs
- Fix enum_window_callback signature to use LPARAM and BOOL types
- Fix EnumWindows call to use LPARAM() wrapper

Fixes dirvine#8
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.

Windows build fails: unresolved import GetWindowText, HWND not found

1 participant