简体   繁体   中英

Windows 10 custom credential provider

recently I'm trying to make a custom credential provider for windows 10 and I ended up with a sample code provided by Microsoft for Windows 8.1 ( https://learn.microsoft.com/en-us/samples/microsoft/windows-classic-samples/credential-provider/ ). I've tried to make it work on my computer but I can't. It just compiles and makes a `SampleIcredentialProviderV2.dll but it's not working. I click on the registry file within the project folder but it's still not showing up on my login page? Does anyone have experience with this code? how can I make this work. thanks.

Most likely windows can't find your dll or your credential provider has not been properly registered.

There are two things to understand to know how a credential provider is created.

First, all registered credential providers on a computer can be found in this registry location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers

All the subkeys are the GUID (or CLSID) that uniquely identify a COM object, but also a credential provider since they have to implements the IFactory/IUnknown COM interface. Things like {25CBB996-92ED-457e-B28C-4774084BD562}.

Windows will iterate through all those CLSID and if not filtered will try to create an instance of the corresponding credential provider. In order to do so, it will look into

HKEY_CLASSES_ROOT\CLSID

All the subkeys here represents a COM object. Your credential provider CLSID must be present here too. And here comes the second part, inside it there is another subkey, InProcServer32, containing a default value representing where to find the dll associated with this CLSID.

It can either be just the dll name but then it has to be in your PATH environment variable or in the windows/system32 folder, or it can be a full filepath.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM