public DxgiDevice2(object device) { IntPtr ptr = Marshal.GetIUnknownForObject(device); try { this.device = (IDxgiDevice2)Marshal.GetObjectForIUnknown(ptr); } finally { Marshal.Release(ptr); } }
public DxgiDevice2(object device) { IntPtr ptr = Marshal.GetIUnknownForObject(device); try { this.device = (IDxgiDevice2)Marshal.GetObjectForIUnknown(ptr); } finally { Marshal.Release(ptr); } }