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
8 // This the base interface that must be implemented by all custom marshalers.
9 public interface ICustomMarshaler
11 object MarshalNativeToManaged(IntPtr pNativeData);
13 IntPtr MarshalManagedToNative(object ManagedObj);
15 void CleanUpNativeData(IntPtr pNativeData);
17 void CleanUpManagedData(object ManagedObj);
19 int GetNativeDataSize();