public static IAsyncOperation <WebTokenRequestResult> RequestTokenForWindowAsync(IntPtr hWnd, WebTokenRequest request) { Guid iid = InteropHelper.GetIID <IAsyncOperation <WebTokenRequestResult> >(); IWebAuthenticationCoreManagerInterop factory = InteropHelper.GetActivationFactory <IWebAuthenticationCoreManagerInterop>(typeof(WebAuthenticationCoreManager)); return(factory.RequestTokenForWindowAsync(hWnd, request, ref iid)); }
public static IAsyncOperation <WebTokenRequestResult> RequestTokenForWindowAsync(IntPtr hWnd, WebTokenRequest request) { IWebAuthenticationCoreManagerInterop webAuthenticationCoreManagerInterop = (IWebAuthenticationCoreManagerInterop)WindowsRuntimeMarshal.GetActivationFactory(typeof(WebAuthenticationCoreManager)); //Guid guid = typeof(WebAuthenticationCoreManager).GetInterface("IWebAuthenticationCoreManager").GUID; Guid guid = typeof(IAsyncOperation <WebTokenRequestResult>).GUID; return(webAuthenticationCoreManagerInterop.RequestTokenForWindowAsync(hWnd, request, ref guid)); }
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)); }
public static IAsyncInfo RequestTokenForWindowAsync(IntPtr appWindow, WebTokenRequest request) { var iid = GuidGenerator.CreateIID(typeof(IAsyncOperation <WebTokenRequestResult>)); return((IAsyncInfo)webAuthenticationCoreManagerInterop.RequestTokenForWindowAsync(appWindow, request, iid)); }