Skip to content

Conversation

kennykerr
Copy link
Collaborator

The from_win32 method has a dual role that can be confusing as it either means retrieving the last error from the thread via GetLastError or it means converting a Win32 error code to an HRESULT. Then there's the internal from_thread that retrieves the last error from the thread via GetErrorInfo. I think we should settle on from_thread for those functions that retrieve error information from the thread, in one way or another, and only use from_win32 to mean converting from a Win32 error code.

Fixes: #3700

This reverts commit ba672c1.
@kennykerr kennykerr merged commit 9db5bba into master Aug 6, 2025
29 checks passed
@kennykerr kennykerr deleted the from_thread2 branch August 6, 2025 15:55
@riverar riverar mentioned this pull request Sep 12, 2025
pronebird added a commit to nymtech/nym-vpn-client that referenced this pull request Oct 10, 2025
Error::from_win32() has been renamed to Error::from_thread()
See: microsoft/windows-rs#3701
pronebird added a commit to nymtech/nym-vpn-client that referenced this pull request Oct 10, 2025
Error::from_win32() has been renamed to Error::from_thread()
See: microsoft/windows-rs#3701
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.

Resolve from_win32 confusion from windows-result

1 participant