-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix Interop.Gdi32.StartDoc p/invoke #76569
Conversation
Tagging subscribers to this area: @dotnet/area-system-drawing Issue Details
This switches the See #76538. This is the fix in main. We will need to backport to 7.0.
|
src/libraries/System.Drawing.Common/src/Interop/Windows/Interop.Gdi32.cs
Show resolved
Hide resolved
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3179059542 |
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.
LGTM, thank you @elinor-fung
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.
LGTM
StartDoc
takes a pointer to aDOCINFO
struct. We hadDOCINFO
defined as a class on the managed side such that built-in marshalling would marshal it as a pointer. With the switch to custom marshalling viaNativeMarshalling
, we ended up marshalling the struct that is the native representation rather than a pointer to it.This switches the
DOCINFO
to a struct and updates the parameter toStartDoc
to bein
, such that it should be marshalled as a pointer to the struct by both generated and built-in marshalling.See #76538. This is the fix in main. We will need to backport to 7.0.
cc @ericstj @JeremyKuhne