locked
Wrapping Vista standard smart card provider RRS feed

  • Question

  • Hi all, i need to add some additional verification to vista's standard smart card provider.
    I saw the 'wrap existing credential provider' sample in msdn but can't figure out how to wrap the smart card provider instead of the 'generic provider' of the sample.
    Can someone point me in the right direction to wrap the smart card provider or give me references on how to extract a ca's certificate from smart card and use it to login with a credential provider?
    Thanks in advance
    Tuesday, February 26, 2008 11:05 AM

All replies

  • You can look in the class CSampleProvider, function SetUsageScenario, you will see a line:

     

    hr = ::CoCreateInstance(CLSID_GenericCredentialProvider, NULL, CLSCTX_ALL, IID_PPV_ARGS(&pUnknown));

     

    Replace CLSID_GenericCredentialProvider with CLSID_SmartcardCredentialProvider, these constants are defined in credentialprovider.h . You can wrap any existing CRP by using the corresponding class id.

     

    Good luck!

    Wednesday, February 27, 2008 6:58 AM
  • Thanks a lot! This was really helpful!

    Wednesday, February 27, 2008 8:47 AM