-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Moving StandardOleMarshalObject type down to corelib #38072
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -747,6 +747,7 @@ | |
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ICustomMarshaler.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\ICustomQueryInterface.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\IDynamicInterfaceCastable.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\IMarshal.cs" /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You also need to move the linker directives in src\libraries\System.Runtime.InteropServices\src\ILLinkTrim.xml . Otherwise, this will be broken. We do not seem to have any tests for this, so the fact that it is broken will be noticed only the change hits WinForms/WPF repos that depend on this type. Could you please get this fixed asap? |
||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InAttribute.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InterfaceTypeAttribute.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\InvalidComObjectException.cs" /> | ||
|
|
@@ -1527,6 +1528,9 @@ | |
| <Compile Include="$(CommonPath)Interop\Windows\Ole32\Interop.CoCreateGuid.cs"> | ||
| <Link>Common\Interop\Windows\Ole32\Interop.CoCreateGuid.cs</Link> | ||
| </Compile> | ||
| <Compile Include="$(CommonPath)\Interop\Windows\Ole32\Interop.CoGetStandardMarshal.cs"> | ||
| <Link>Common\Interop\Windows\Ole32\Interop.CoGetStandardMarshal.cs</Link> | ||
| </Compile> | ||
| <Compile Include="$(CommonPath)Interop\Windows\Secur32\Interop.GetUserNameExW.cs"> | ||
| <Link>Common\Interop\Windows\Secur32\Interop.GetUserNameExW.cs</Link> | ||
| </Compile> | ||
|
|
@@ -1583,6 +1587,7 @@ | |
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Loader\LibraryNameVariation.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\MemoryFailPoint.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Marshal.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\StandardOleMarshalObject.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Versioning\VersioningHelper.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Security\SecureString.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Thread.Windows.cs" /> | ||
|
|
@@ -1794,6 +1799,7 @@ | |
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Loader\LibraryNameVariation.Unix.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\MemoryFailPoint.Unix.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\Marshal.Unix.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\StandardOleMarshalObject.Unix.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Versioning\VersioningHelper.Unix.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Security\SecureString.Unix.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Thread.Unix.cs" /> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| namespace System.Runtime.InteropServices | ||
| { | ||
| public class StandardOleMarshalObject : MarshalByRefObject, IMarshal | ||
| { | ||
| protected StandardOleMarshalObject() | ||
| { | ||
| } | ||
|
|
||
| int IMarshal.GetUnmarshalClass(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out Guid pCid) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None of these implementation methods are needed. This should be just a dummy type with just a constructor. |
||
| { | ||
| pCid = Guid.Empty; | ||
| return HResults.E_NOTIMPL; | ||
| } | ||
|
|
||
| int IMarshal.GetMarshalSizeMax(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out int pSize) | ||
| { | ||
| pSize = -1; | ||
| return HResults.E_NOTIMPL; | ||
| } | ||
|
|
||
| int IMarshal.MarshalInterface(IntPtr pStm, ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags) | ||
| { | ||
| return HResults.E_NOTIMPL; | ||
| } | ||
|
|
||
| int IMarshal.UnmarshalInterface(IntPtr pStm, ref Guid riid, out IntPtr ppv) | ||
| { | ||
| ppv = IntPtr.Zero; | ||
| return HResults.E_NOTIMPL; | ||
| } | ||
|
|
||
| int IMarshal.ReleaseMarshalData(IntPtr pStm) | ||
| { | ||
| return HResults.E_NOTIMPL; | ||
| } | ||
|
|
||
| int IMarshal.DisconnectObject(int dwReserved) | ||
| { | ||
| return HResults.E_NOTIMPL; | ||
| } | ||
| } | ||
| } | ||
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.
This should be in the Windows-specific block.