public virtual T QueryInterface <T>() where T : ComObject { IntPtr outPtr; this.QueryInterface(Utilities.GetGuidFromType(typeof(T)), out outPtr); return(CppObject.FromPointer <T>(outPtr)); }
internal virtual T QueryInterfaceUnsafe <T>() { IntPtr outPtr; this.QueryInterface(Utilities.GetGuidFromType(typeof(T)), out outPtr); return(CppObject.FromPointerUnsafe <T>(outPtr)); }
/// <summary> /// Initializes this instance with a pointer from a temporary object and set the pointer of the temporary /// object to IntPtr.Zero. /// </summary> /// <param name="temp">The instance to get the NativePointer.</param> protected void FromTemp(CppObject temp) { NativePointer = temp.NativePointer; temp.NativePointer = IntPtr.Zero; }
public virtual T QueryInterfaceOrNull <T>() where T : ComObject { return(CppObject.FromPointer <T>(this.QueryInterfaceOrNull(Utilities.GetGuidFromType(typeof(T))))); }