您如何在UWP中进行模拟? [英] How do you do Impersonation in UWP?

查看:125
本文介绍了您如何在UWP中进行模拟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理UWP应用程序.我想更改当前上下文用户(当前登录用户)的情况出现了.为此,我尝试在UWP中实现模拟.在一般的Windows或Web应用程序中,我可以使用以下链接上提供的示例代码来更改当前上下文用户: http://www.codeproject. com/Articles/10090/A-small-C-Class用于模拟用户 但是我无法在UWP中实现这一点. 我想在UWP中实施模拟.

I am working on UWP application. A scenario came where i want to change the current context user(current login user).For that i am trying to implement Impersonation in UWP. In general windows or web application I am able to change the current context user by using sample code available on following link: http://www.codeproject.com/Articles/10090/A-small-C-Class-for-impersonating-a-User But i am unable to implement this in UWP. I want to implement impersonation in UWP.

推荐答案

模拟不适用于UWP应用程序.它们都仅通过一组受限的授权与当前会话用户绑定.

Impersonation is not available for UWP applications. They are all tied to the current session user with only a restricted set of authorizations.

LogonUser 用于模拟的API仅适用于台式机/win32应用.

The LogonUser API used to impersonate is only available to desktop/win32 apps.

您可以检查UWP中所有受支持的Win32 API的列表

You can check the list of all the supported Win32 API in UWP here.

这篇关于您如何在UWP中进行模拟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆