0

我正在尝试在 VC++ 2015(Windows 10 x64)中使用 CNG(下一代密码学)迈出第一步。这是代码:

#include "stdafx.h"
#include <windows.h>

int main()
{
    NTSTATUS status;
    ULONG cbBufSize = 0;
    PCRYPT_PROVIDERS pBuf = NULL;
    status = BCryptEnumRegisteredProviders(&cbBufSize, &pBuf);
    return 0;
}

构建项目(对于 x86),我收到一条错误消息:

函数 _main 中引用的错误 LNK2019 未解析的外部符号 _BCryptEnumRegisteredProviders@8

然后我尝试安装“CNG 软件开发工具包”并按照以下说明配置项目:http: //www.codeproject.com/Articles/18713/Simple-way-to-crypt-a-file-with-CNG 但项目building 给出了同样的错误信息。

请帮忙!

PS:我在(Win7 x86,VS 2008)中做了同样的事情,它没有任何错误。

4

0 回答 0