public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); }
public void GetComInterfaceForObject_NonGenericCustomQueryInterfaceModeWithValidClass_ReturnsExpected(CustomQueryInterfaceMode mode) { var o = new ClassWithInterface(); IntPtr iUnknown = Marshal.GetComInterfaceForObject(o, typeof(INonGenericInterface), mode); try { Assert.NotEqual(IntPtr.Zero, iUnknown); } finally { Marshal.Release(iUnknown); } }
/// <summary> /// Return the IUnknown* representing the interface for the Object. /// Object o should support Type T, it refer the value of mode to /// invoke customized QueryInterface or not. /// </summary> public static IntPtr /* IUnknown* */ GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode) { bool bEnableCustomizedQueryInterface = ((mode == CustomQueryInterfaceMode.Allow) ? true : false); return(GetComInterfaceForObjectNative(o, T, false, bEnableCustomizedQueryInterface)); }
public static IntPtr GetComInterfaceForObject(Object o, Type T, CustomQueryInterfaceMode mode) { return(default(IntPtr)); }
public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode);
public static IntPtr GetComInterfaceForObject(Object o, Type T, CustomQueryInterfaceMode mode) { return default(IntPtr); }