Matt
Matt

Reputation: 985

Credential Provider DLL doesn't load properly when built using debug mode

I have built the DLL in release mode for x64 successfully. After registering it with the Register.reg file, the Crdential Provider loads properly when I lock my computer.

However, when I build in Debug mode for x64, my Credential Provider will not load when I lock my computer. Is there something wrong with my build configuration? What do I need to check?

Upvotes: 0

Views: 972

Answers (1)

jvpernis
jvpernis

Reputation: 205

You were probably not facing this, but it might be relevant for anyone else stumbling onto this question.

In my situation, I was running the Credential Provider on a different machine than I was building the code on. As it turns out, I did not have the debug version of the C++ Runtime files installed on the target machine.

The debug runtime files are not shipped with the normal C++ redistributable package which you can download from Microsoft's website. They are only available from your Visual Studio installation (see this reference for Visual Studio 2017).

Copy the contents of the folllowing folder:

  • [VisualStudioFolder]\VC\Redist\MSVC\[version]\debug_nonredist\x64\Microsoft.VC[version].DebugCRT\

To:

  • C:\Windows\System32

Also make sure to change the owner of the manually copied files to the SYSTEM user.

Note that these files are not allowed to be distributed along with your application, they are only available for development puposes.

Upvotes: 0

Related Questions