public static IAsyncOperation <WebTokenRequestResult> RequestTokenWithWebAccountForWindowAsync(IntPtr hWnd, WebTokenRequest request, WebAccount webAccount) { IWebAuthenticationCoreManagerInterop webAuthenticationCoreManagerInterop = (IWebAuthenticationCoreManagerInterop)WindowsRuntimeMarshal.GetActivationFactory(typeof(WebAuthenticationCoreManager)); Guid guid = typeof(IAsyncOperation <WebTokenRequestResult>).GUID; return(webAuthenticationCoreManagerInterop.RequestTokenWithWebAccountForWindowAsync(hWnd, request, webAccount, ref guid)); }
public static IAsyncOperation <WebTokenRequestResult> RequestTokenWithWebAccountForWindowAsync(IntPtr hWnd, WebTokenRequest request, WebAccount webAccount) { Guid iid = InteropHelper.GetIID <IAsyncOperation <WebTokenRequestResult> >(); IWebAuthenticationCoreManagerInterop factory = InteropHelper.GetActivationFactory <IWebAuthenticationCoreManagerInterop>(typeof(WebAuthenticationCoreManager)); return(factory.RequestTokenWithWebAccountForWindowAsync(hWnd, request, webAccount, ref iid)); }
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 IAsyncAction ShowAddAccountForWindowAsync(IntPtr hWnd) { IWebAuthenticationCoreManagerInterop webAuthenticationCoreManagerInterop = WebAuthenticationCoreManager.As <IWebAuthenticationCoreManagerInterop>(); IAccountsSettingsPaneInterop accountsSettingsPaneInterop = AccountsSettingsPane.As <IAccountsSettingsPaneInterop>(); //Guid guid = typeof(IAsyncAction).GUID; Guid guid = WinRT.GuidGenerator.CreateIID(typeof(IAsyncAction)); //IAccountsSettingsPaneInterop accountsSettingsPaneInterop = // (IAccountsSettingsPaneInterop)WindowsRuntimeMarshal.GetActivationFactory(typeof(AccountsSettingsPane)); //Guid guid = typeof(IAsyncAction).GUID; accountsSettingsPaneInterop.ShowAddAccountForWindowAsync(hWnd, ref guid, out IntPtr result); return(MarshalInterface <IAsyncAction> .FromAbi(result)); }