예제 #1
0
            private static unsafe int Do_Abi_GetIndexedValue_4(IntPtr thisPtr, IntPtr target, IntPtr index, IntPtr *result)
            {
                object __result = default;

                try
                {
                    __result = global::WinRT.ComWrappersSupport.FindObject <global::Microsoft.UI.Xaml.Data.ICustomProperty>(thisPtr).GetIndexedValue(MarshalInspectable <object> .FromAbi(target), MarshalInspectable <object> .FromAbi(index));
                    *result = MarshalInspectable <object> .FromManaged(__result);
                }
                catch (Exception __exception__)
                {
                    global::WinRT.ExceptionHelpers.SetErrorInfo(__exception__);
                    return(global::WinRT.ExceptionHelpers.GetHRForException(__exception__));
                }
                return(0);
            }
예제 #2
0
        public static IAsyncOperation <WebTokenRequestResult> RequestTokenForWindowAsync(IntPtr hWnd, WebTokenRequest request)
        {
            IWebAuthenticationCoreManagerInterop webAuthenticationCoreManagerInterop =
                WebAuthenticationCoreManager.As <IWebAuthenticationCoreManagerInterop>();
            Guid guid = WinRT.GuidGenerator.CreateIID(typeof(IAsyncOperation <WebTokenRequestResult>));

            var requestPtr = MarshalInspectable <WebTokenRequest> .FromManaged(request);

            webAuthenticationCoreManagerInterop.RequestTokenForWindowAsync(
                hWnd,
                requestPtr,
                ref guid,
                out IntPtr result);

            return(MarshalInterface <IAsyncOperation <WebTokenRequestResult> > .FromAbi(result));
        }
예제 #3
0
            private static unsafe int Do_Abi_ActivateInstance_0(IntPtr thisPtr, out IntPtr instance)
            {
                object __instance = default;

                instance = default;
                try
                {
                    __instance = global::WinRT.ComWrappersSupport.FindObject <global::Windows.Foundation.IActivationFactory>(thisPtr).ActivateInstance();
                    instance   = MarshalInspectable.FromManaged(__instance);
                }
                catch (Exception __exception__)
                {
                    global::WinRT.ExceptionHelpers.SetErrorInfo(__exception__);
                    return(global::WinRT.ExceptionHelpers.GetHRForException(__exception__));
                }
                return(0);
            }
예제 #4
0
        public new IntPtr ActivateInstance()
        {
            T comp = new T();

            return(MarshalInspectable <T> .FromManaged(comp));
        }