Skip to content

Moving StandardOleMarshalObject type down to corelib#38072

Merged
Anipik merged 4 commits intodotnet:masterfrom
Anipik:coMarshal
Jun 18, 2020
Merged

Moving StandardOleMarshalObject type down to corelib#38072
Anipik merged 4 commits intodotnet:masterfrom
Anipik:coMarshal

Conversation

@Anipik
Copy link
Copy Markdown
Contributor

@Anipik Anipik commented Jun 18, 2020

Fixes #37782

@Anipik Anipik requested a review from ViktorHofer June 18, 2020 07:41
@Anipik Anipik merged commit f31f9f8 into dotnet:master Jun 18, 2020
{
}

int IMarshal.GetUnmarshalClass(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out Guid pCid)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of these implementation methods are needed. IMarshal is internal interface used just for COM; and COM is not supported on Unix.

This should be just a dummy type with just a constructor.

<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" />
Copy link
Copy Markdown
Member

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.

<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" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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?

@Anipik Anipik deleted the coMarshal branch August 25, 2020 21:52
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile Windows specific com files while building against Unix

6 participants