小编fra*_*tim的帖子

在"其他用户"磁贴上显示V2凭据提供程序

我正在尝试编写自定义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)

c++ windows winapi credentials credential-providers

6
推荐指数
1
解决办法
2010
查看次数

标签 统计

c++ ×1

credential-providers ×1

credentials ×1

winapi ×1

windows ×1