[MethodImpl(MethodImplOptions.InternalCall)]
private static extern object InternalCreateWrapperOfType(object o, Type t);
+ /// <summary>
+ /// check if the type is visible from COM.
+ /// </summary>
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern bool IsTypeVisibleFromCom(Type t);
+
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern int /* HRESULT */ QueryInterface(IntPtr /* IUnknown */ pUnk, ref Guid iid, out IntPtr ppv);
/// </summary>
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern int GetStartComSlot(Type t);
+
+ /// <summary>
+ /// <para>Returns the last valid COM slot that GetMethodInfoForSlot will work on. </para>
+ /// </summary>
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ public static extern int GetEndComSlot(Type t);
#endif // FEATURE_COMINTEROP
/// <summary>
throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
}
+ public static int GetEndComSlot(Type t)
+ {
+ throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
+ }
+
public static Type GetTypeFromCLSID(Guid clsid)
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
return false;
}
+ public static bool IsTypeVisibleFromCom(Type t)
+ {
+ if (t == null)
+ {
+ throw new ArgumentNullException(nameof(t));
+ }
+ return false;
+ }
+
public static int QueryInterface(IntPtr pUnk, ref Guid iid, out IntPtr ppv)
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
FCFuncElement("GetNativeVariantForObject", MarshalNative::GetNativeVariantForObject)
FCFuncElement("GetObjectForNativeVariant", MarshalNative::GetObjectForNativeVariant)
FCFuncElement("InternalFinalReleaseComObject", MarshalNative::FinalReleaseComObject)
+ FCFuncElement("IsTypeVisibleFromCom", MarshalNative::IsTypeVisibleFromCom)
FCFuncElement("QueryInterface", MarshalNative::QueryInterface)
FCFuncElement("CreateAggregatedObject", MarshalNative::CreateAggregatedObject)
FCFuncElement("AreComObjectsAvailableForCleanup", MarshalNative::AreComObjectsAvailableForCleanup)
FCFuncElement("InternalCreateWrapperOfType", MarshalNative::InternalCreateWrapperOfType)
FCFuncElement("GetObjectsForNativeVariants", MarshalNative::GetObjectsForNativeVariants)
FCFuncElement("GetStartComSlot", MarshalNative::GetStartComSlot)
-
+ FCFuncElement("GetEndComSlot", MarshalNative::GetEndComSlot)
+
FCFuncElement("InitializeManagedWinRTFactoryObject", MarshalNative::InitializeManagedWinRTFactoryObject)
FCFuncElement("GetNativeActivationFactory", MarshalNative::GetNativeActivationFactory)