I'm trying to do my first step with CNG (Cryptography Next Generation) in VC++ 2015 (Windows 10 x64). Here's the code:
#include "stdafx.h"
#include <windows.h>
int main()
{
NTSTATUS status;
ULONG cbBufSize = 0;
PCRYPT_PROVIDERS pBuf = NULL;
status = BCryptEnumRegisteredProviders(&cbBufSize, &pBuf);
return 0;
}
Building the project (for x86), I got an error message:
Error LNK2019 unresolved external symbol _BCryptEnumRegisteredProviders@8 referenced in function _main
I then tried to install "CNG Software Development Kit" and configured the project following this instruction: http://www.codeproject.com/Articles/18713/Simple-way-to-crypt-a-file-with-CNG but project building gave the same error message.
Please help!
PS: I did the same thing in (Win7 x86, VS 2008) and it worked without any error.