-
Notifications
You must be signed in to change notification settings - Fork 199
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
Unsupported PreserveSig = false combination prevent working with images in WinForms. #1183
Comments
I see two cases left
For case 1 I probably should extend condition here somehow. runtimelab/src/coreclr/tools/Common/TypeSystem/IL/Stubs/PInvokeILEmitter.cs Lines 234 to 235 in 5a44950
And that would be it in general. With case 2 I'm have one idea, but not sure that this is what you want to have as part of code.
should be translated to
This increase count of marshallers by 1 then all other cases and I do not sure where modifications should be.
Maybe some other kind of MethodThunk should be created for this case, and then I can use that as switch here
So I would like to have some advice on case 2 |
This is wrong PInvoke definition.
I do not think increasing count of marshallers would work well. I think you want to keep the count of the marshallers same, and instead handle the HRESULT swapping by adding special cases as necessary. It is how CoreCLR does it - look for |
I tried with
And this code throws ArgumentException on CoreCLR. So I assume that even this is wierd it should be supported. Isn't it?
Will do. No error handling there at all, I assume they want |
I send changes to WinForms, that was only one strange place. Also I inspect WPF too and found 2 more locations I probably send PR again, but my last PR is still pending and do not know how to ping people. |
It should be transformed into |
Any image related code crashed with following exception
Lines which crash compiler:
https://github.com/dotnet/winforms/blob/d46ad2e8dc76248739d9ae22b28b399a6a6b299e/src/System.Windows.Forms.Primitives/src/Interop/Ole32/Interop.OleCreatePictureIndirect.cs#L12-L14
The text was updated successfully, but these errors were encountered: