我正在尝试编写自定义Windows凭据提供程序.我已经下载了V2凭证提供程序示例,我可以构建,注册和使用它.
为了测试,我已经设置了一个hyper-v Windows 8.1实例并加入了一个Windows测试域.
但是,自定义凭据提供程序仅显示在用户切片上,而不显示在"其他用户"磁贴上.
文档(Windows 8.docx中的凭据提供程序框架更改)提供了一个小代码段:
// Gets the SID of the user corresponding to the credential. HRESULT CSampleCredential::GetUserSid(__deref_out PWSTR *ppszSid)
{
*ppszSid = nullptr;
HRESULT hr = E_UNEXPECTED;
// _pszUserSid is a private member of CSampleCredential
if (_pszUserSid != nullptr)
{
// ppszSid will be freed by Logon UI
hr = SHStrDupW(_pszUserSid, ppszSid);
}
// Return S_FALSE with a null SID in ppszSid for the
// credential to be associated with an anonymous user …Run Code Online (Sandbox Code Playgroud)