-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First round of converting System.Drawing.Common to COMWrappers (#54636)
* First round of converting System.Drawing.Common to COMWrappers Using COM Wrappers makes the library trim compatible. * Add Trimming Test for Icon.Save * Add support for OS specific trimming tests * Use function pointers instead of delegates * Rename Guid to IID * Better interop to closely match the native side * Release any COM pointer that was QueryInterface * Use pointers instead of Marshal.PtrToStructure/StructureToPtr * No need for a VTable struct, just set each function pointer right into the table * Wrap all managed calls in try-catch and return HResult * Use COM naming * Fix method signature to use pointer instead of out. * CheckStatus => ThrowExceptionForHR * Pass -1 to Marshal.GetExceptionForHR so it doesn't query GetErrorInfo, and always returns the correct exception type * Create the PictureWrapper with UniqueInstance, so it doesn't get cached. Caching it causes lifetime issues.
- Loading branch information
Showing
15 changed files
with
603 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.