Пример #1
0
        public virtual T QueryInterface <T>() where T : ComObject
        {
            IntPtr outPtr;

            this.QueryInterface(Utilities.GetGuidFromType(typeof(T)), out outPtr);
            return(CppObject.FromPointer <T>(outPtr));
        }
Пример #2
0
        internal virtual T QueryInterfaceUnsafe <T>()
        {
            IntPtr outPtr;

            this.QueryInterface(Utilities.GetGuidFromType(typeof(T)), out outPtr);
            return(CppObject.FromPointerUnsafe <T>(outPtr));
        }
Пример #3
0
 /// <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;
 }
Пример #4
0
 public virtual T QueryInterfaceOrNull <T>() where T : ComObject
 {
     return(CppObject.FromPointer <T>(this.QueryInterfaceOrNull(Utilities.GetGuidFromType(typeof(T)))));
 }