1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
6 namespace System.Runtime.InteropServices.CustomMarshalers
8 internal class ExpandoToDispatchExMarshaler : ICustomMarshaler
10 private static readonly ExpandoToDispatchExMarshaler s_ExpandoToDispatchExMarshaler = new ExpandoToDispatchExMarshaler();
12 public static ICustomMarshaler GetInstance(string? cookie) => s_ExpandoToDispatchExMarshaler;
14 private ExpandoToDispatchExMarshaler()
18 public void CleanUpManagedData(object ManagedObj)
22 public void CleanUpNativeData(IntPtr pNativeData)
26 public int GetNativeDataSize()
28 // Return -1 to indicate the managed type this marshaler handles is not a value type.
32 public IntPtr MarshalManagedToNative(object ManagedObj)
34 throw new PlatformNotSupportedException(SR.PlatformNotSupported_IExpando);
37 public object MarshalNativeToManaged(IntPtr pNativeData)
39 throw new PlatformNotSupportedException(SR.PlatformNotSupported_IExpando);