Esempio n. 1
0
        public static global::System.Uri FromAbi(IntPtr ptr)
        {
            if (ptr == IntPtr.Zero)
            {
                return(null);
            }

            using var uri = ObjectReference <ABI.Windows.Foundation.IUriRuntimeClassVftbl> .FromAbi(ptr);

            IntPtr rawUri = IntPtr.Zero;

            try
            {
                ExceptionHelpers.ThrowExceptionForHR(uri.Vftbl.get_RawUri_10(uri.ThisPtr, &rawUri));
                return(new global::System.Uri(MarshalString.FromAbi(rawUri)));
            }
            finally
            {
                MarshalString.DisposeAbi(rawUri);
            }
        }
Esempio n. 2
0
        public static global::System.ComponentModel.PropertyChangedEventArgs FromAbi(IntPtr ptr)
        {
            if (ptr == IntPtr.Zero)
            {
                return(null);
            }

            using var args = ObjectReference <ABI.Microsoft.UI.Xaml.Data.IPropertyChangedEventArgsVftbl> .FromAbi(ptr);

            IntPtr propertyName = IntPtr.Zero;

            try
            {
                ExceptionHelpers.ThrowExceptionForHR(args.Vftbl.get_PropertyName_0(args.ThisPtr, out propertyName));
                return(new global::System.ComponentModel.PropertyChangedEventArgs(MarshalString.FromAbi(propertyName)));
            }
            finally
            {
                MarshalString.DisposeAbi(propertyName);
            }
        }
Esempio n. 3
0
 public void RevokeInterfaceFromGlobal(IntPtr cookie)
 {
     ExceptionHelpers.ThrowExceptionForHR(_obj.Vftbl.RevokeInterfaceFromGlobal(ThisPtr, cookie));
 }