-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add SetLastError to GdiPlus methods #59096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to this area: @safern, @tarekgh Issue DetailsSystem.Drawing uses the last Win32 error in CheckErrorStatus to try to This was broken in .NETCore when SetLastError was removed from PINvokes. Bring back SetLastError for all PInvokes that use CheckErrorStatus.
|
AaronRobinsonMSFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the conversation in #58741, this is what the Interop team would recommend.
System.Drawing uses the last Win32 error in CheckErrorStatus to try to guess at why a GdiPlus draw method failed and ignore some failures. This was broken in .NETCore when SetLastError was removed from PINvokes. Bring back SetLastError for all PInvokes that use CheckErrorStatus.
1eaccab to
b70902d
Compare
JeremyKuhne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
|
/backport to release/6.0 |
|
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1237690219 |
System.Drawing uses the last Win32 error in CheckErrorStatus to try to guess at why a GdiPlus draw method failed and ignore some failures. This was broken in .NETCore when SetLastError was removed from PINvokes. Bring back SetLastError for all PInvokes that use CheckErrorStatus.
* Add SetLastError to GdiPlus methods (#59096) System.Drawing uses the last Win32 error in CheckErrorStatus to try to guess at why a GdiPlus draw method failed and ignore some failures. This was broken in .NETCore when SetLastError was removed from PINvokes. Bring back SetLastError for all PInvokes that use CheckErrorStatus. * Rev servicing version and include into packages list Co-authored-by: Eric StJohn <ericstj@microsoft.com>
System.Drawing uses the last Win32 error in CheckErrorStatus to try to
guess at why a GdiPlus draw method failed and ignore some failures.
This was broken in .NETCore when SetLastError was removed from PINvokes.
Bring back SetLastError for all PInvokes that use CheckErrorStatus.