This change exposes Marshal.CleanupUnusedObjectsInCurrentContext. Also it a GetHINSTANCE implementation for non-windows platform by throwing
ArgumentNullException as per https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.gethinstance(v=vs.110).aspx.
<Member Name="AllocCoTaskMem(System.Int32)" />
<Member Name="BindToMoniker(System.String)" />
<Member Name="ChangeWrapperHandleStrength(System.Object,System.Boolean)" />
+ <Member Name="CleanupUnusedObjectsInCurrentContext" />
<Member Name="Copy(System.Byte[],System.Int32,System.IntPtr,System.Int32)" />
<Member Name="Copy(System.Char[],System.Int32,System.IntPtr,System.Int32)" />
<Member Name="Copy(System.Double[],System.Int32,System.IntPtr,System.Int32)" />
[System.Security.SecurityCriticalAttribute]
public static object BindToMoniker(string monikerName) { throw null; }
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)][System.Security.SecurityCritical]
- public static void ChangeWrapperHandleStrength(object otp, bool fIsWeak) { throw null; }
+ public static void ChangeWrapperHandleStrength(object otp, bool fIsWeak) { throw null; }
+ [System.Security.SecurityCriticalAttribute]
+ public static void CleanupUnusedObjectsInCurrentContext() { throw null; }
[System.Security.SecurityCriticalAttribute]
public static void Copy(byte[] source, int startIndex, System.IntPtr destination, int length) { }
[System.Security.SecurityCriticalAttribute]
}
[System.Security.SecurityCriticalAttribute]
+ public static void CleanupUnusedObjectsInCurrentContext()
+ {
+ return;
+ }
+
+ [System.Security.SecurityCriticalAttribute]
public static System.IntPtr CreateAggregatedObject<T>(System.IntPtr pOuter, T o)
{
throw new PlatformNotSupportedException();
[System.Security.SecurityCriticalAttribute]
public static System.IntPtr GetHINSTANCE(System.Reflection.Module m)
{
+ if (m == null)
+ {
+ throw new ArgumentNullException(nameof(m));
+ }
return (System.IntPtr) (-1);
}
FCFuncElement("InitializeWrapperForWinRT", MarshalNative::InitializeWrapperForWinRT)
FCFuncElement("GetTypedObjectForIUnknown", MarshalNative::GetTypedObjectForIUnknown)
FCFuncElement("ChangeWrapperHandleStrength", MarshalNative::ChangeWrapperHandleStrength)
+ FCFuncElement("CleanupUnusedObjectsInCurrentContext", MarshalNative::CleanupUnusedObjectsInCurrentContext)
#ifndef FEATURE_CORECLR
FCFuncElement("GetLoadedTypeForGUID", MarshalNative::GetLoadedTypeForGUID)
FCFuncElement("GetITypeInfoForType", MarshalNative::GetITypeInfoForType)
- FCFuncElement("CleanupUnusedObjectsInCurrentContext", MarshalNative::CleanupUnusedObjectsInCurrentContext)
FCFuncElement("IsTypeVisibleFromCom", MarshalNative::IsTypeVisibleFromCom)
FCFuncElement("FCallGenerateGuidForType", MarshalNative::DoGenerateGuidForType)
FCFuncElement("FCallGetTypeLibGuid", MarshalNative::DoGetTypeLibGuid)