Resolve from_win32
confusion from windows-result
#3701
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
from_win32
method has a dual role that can be confusing as it either means retrieving the last error from the thread viaGetLastError
or it means converting a Win32 error code to anHRESULT
. Then there's the internalfrom_thread
that retrieves the last error from the thread viaGetErrorInfo
. I think we should settle onfrom_thread
for those functions that retrieve error information from the thread, in one way or another, and only usefrom_win32
to mean converting from a Win32 error code.Fixes: #3700