public DxgiSurface1(object resource) { IntPtr ptr = Marshal.GetIUnknownForObject(resource); try { this.surface = (IDxgiSurface1)Marshal.GetObjectForIUnknown(ptr); } finally { Marshal.Release(ptr); } }
public static IDxgiSurface1 CreateRef(this IDxgiSurface1 objectRef) => ((IDxgiSurface1)objectRef.CreateRef(typeof(IDxgiSurface1)));
internal DxgiSurface1(IDxgiSurface1 surface) { this.surface = surface; }