public DxgiDevice(object device) { IntPtr ptr = Marshal.GetIUnknownForObject(device); try { this.device = (IDxgiDevice)Marshal.GetObjectForIUnknown(ptr); } finally { Marshal.Release(ptr); } }
public DxgiDevice(object device) { IntPtr ptr = Marshal.GetIUnknownForObject(device); try { this.device = (IDxgiDevice)Marshal.GetObjectForIUnknown(ptr); } finally { Marshal.Release(ptr); } }
public static IDxgiDevice CreateRef(this IDxgiDevice objectRef) => ((IDxgiDevice)objectRef.CreateRef(typeof(IDxgiDevice)));