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 using System.Collections;
7 using System.Collections.Generic;
8 using System.Runtime.InteropServices.ComTypes;
11 namespace System.Runtime.InteropServices.CustomMarshalers
13 internal class ExpandoToDispatchExMarshaler : ICustomMarshaler
15 private static readonly ExpandoToDispatchExMarshaler s_ExpandoToDispatchExMarshaler = new ExpandoToDispatchExMarshaler();
17 public static ICustomMarshaler GetInstance(string cookie) => s_ExpandoToDispatchExMarshaler;
19 private ExpandoToDispatchExMarshaler()
23 public void CleanUpManagedData(object ManagedObj)
27 public void CleanUpNativeData(IntPtr pNativeData)
31 public int GetNativeDataSize()
33 // Return -1 to indicate the managed type this marshaler handles is not a value type.
37 public IntPtr MarshalManagedToNative(object ManagedObj)
39 throw new PlatformNotSupportedException(SR.PlatformNotSupported_IExpando);
42 public object MarshalNativeToManaged(IntPtr pNativeData)
44 throw new PlatformNotSupportedException(SR.PlatformNotSupported_IExpando);