如何在另一个用户图块上的多个用户图块上显示ICredentialProviderCredentialv2 [英] How to show ICredentialProviderCredentialv2 on more than one User tile on the other user tile

查看:378
本文介绍了如何在另一个用户图块上的多个用户图块上显示ICredentialProviderCredentialv2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发Credentialprovider v2.我正在尝试使用Microsoft提供的samplecredentialproviderv2.在安装可再发行的2013并针对正确的体系结构进行编译后,我对其进行了注册并成功运行.

I'm trying to develop a Credentialprovider v2. I'm experimenting around with the samplecredentialproviderv2 provided by Microsoft.After installing the redistributable 2013 and compiling for the right architecture, I'd registered it and it worked.

我的问题是,它仅适用于显示的第一个用户图块.如果我枚举了一个以上的用户,则它要么仅显示在一个用户磁贴中,要么出现错误并破坏了我的登录UI.

My Problem is, it works only on the first shown user tile. If I enumerate more than one usertile, it is either shown in only one user tile, or I became an error and destroyed my Logon UI.

我知道问题与一个.在这里我可以说我已经尝试了提到的Microsoft文档中所述的解决方案.有一个功能指示是否显示了其他用户"图块,并且该功能效果很好.唯一的事情是,else if如果不起作用,因为如果您获得合法的瓦片,则getSid不会到达else if.因此,如果在getSid中返回空sid和hr_false,则将在另一个用户磁贴中显示credentialprovider,但在这种情况下,其他地方都不会显示.如果此解决方案是硬编码的. 我尝试创建多个ICredentialProviderCredential,以便获得接口列表,但是它不起作用.

I know the question is quite similar to this one. Here I can say I've tried the solution stated in the mentioned Microsoft document. There is a function which indicates if the "other user" tile is shown and this function works quite good. The only thing is, the else if won't work, because if you get a legit tile getSid won't reach the else if. So if you return in getSid a null sid and hr_false the credentialprovider is shown the other user tile, but in this case not shown everywhere else. If this solution is hard coded. I've tried to create more than one ICredentialProviderCredential, so that I have a list of interfaces, but it doesn't worked.

此处提供的文档说: •v2凭据提供程序必须实现ICredentialProviderCredential2接口,并在GetUserSID函数上返回有效的SID.这会告诉Windows提供程序应与哪些用户相关联."

The document, which is provided here, says the following: "• v2 credential providers must implement the ICredentialProviderCredential2 interface and return a valid SID on the GetUserSID function. This tells Windows which user(s) the provider should be associated with."

我的问题是,如何在GetUserSid函数中返回多个Sid. 如果您能提供帮助,那就太好了.

My problem is, how to return more than one Sid in the GetUserSid function. It would be great if you can help.

推荐答案

在ICredentialProvider :: GetCredentialCount()中,您将返回凭证提供者将提供的凭证切片(每个用户一个)的数量(凭证提供者可以了解到多少那里的用户来自给SetUserArray()的用户数组中的来自".返回一个不同的ICredentialProviderCredential2实例,以响应对ICredentialProvider :: GetCredentialAt()的每次调用登录,并从每个这些实例中返回一个不同的SID,以响应GetUserSID().然后,您的每个凭据都应在登录时与其他用户关联.

In ICredentialProvider::GetCredentialCount() you return the number of credential tiles (one per user) that your credential provider will supply (the credential provider can learn how many users there 'are' from the user array given to SetUserArray() ). Return a different ICredentialProviderCredential2 instance in response to each call logon makes to your ICredentialProvider::GetCredentialAt(), and from each of these instances return a different SID in response to GetUserSID(). Each of your credentials should then be associated with a different user at logon.

这篇关于如何在另一个用户图块上的多个用户图块上显示ICredentialProviderCredentialv2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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