public static ComObject GetParent(this IDXGIObject obj, Guid riid) { if (obj == null) { throw new ArgumentNullException(nameof(obj)); } obj.GetParent(riid, out object parent); return(new ComObject(parent)); }
public static IComObject <T> GetParent <T>(this IDXGIObject obj) { if (obj == null) { throw new ArgumentNullException(nameof(obj)); } obj.GetParent(typeof(T).GUID, out var parent).ThrowOnError(); return(new ComObject <T>((T)parent)); }
public static ComObject GetParent(this IDXGIObject input, Guid riid) { if (input == null) { throw new ArgumentNullException(nameof(input)); } input.GetParent(riid, out var parent).ThrowOnError(); return(new ComObject(parent)); }