Show list of users in left bottom windows credential provider

316 views Asked by At

I am writing custom windows credential provider using c++ with the help of sample provided by windows CredentialProvider2

I modified CredentialCount and CredentialAt in provider class to return 3 users. Those 3 users appear below sign-in options link. I expect them to display left bottom of the screen.

HRESULT CSampleProvider::GetCredentialCount(
    _Out_ DWORD *pdwCount,
    _Out_ DWORD *pdwDefault,
    _Out_ BOOL *pbAutoLogonWithDefault)
{
    *pdwDefault = CREDENTIAL_PROVIDER_NO_DEFAULT;
    *pbAutoLogonWithDefault = FALSE;

    if (_fRecreateEnumeratedCredentials)
    {
        _fRecreateEnumeratedCredentials = false;
        _ReleaseEnumeratedCredentials();
        _CreateEnumeratedCredentials();
    }

    *pdwCount = 3;

    return S_OK;
}

HRESULT CSampleProvider::GetCredentialAt(
    DWORD dwIndex,
    _Outptr_result_nullonfailure_ ICredentialProviderCredential **ppcpc)
{
    HRESULT hr = E_INVALIDARG;
    *ppcpc = nullptr;

    if(ppcpc){
        hr = _pCredential->QueryInterface(IID_PPV_ARGS(ppcpc));
    }
    return hr;
}

This is what I get I get this

But I want to display the list of users in the left bottom of the screen. I will be a great help if you suggest me the changes are required to make it display left bottom on the screen?

0

There are 0 answers