微软 CryptAPI写了一个程序,XP能正常运行,2000和2003却运行不起来
我用微软 CryptAPI写了一个程序
程序在xp上运行良好,却在2000和2003上运行不起来。
返回错误代码是 keyset does not exist
if( !CrypteAcquireContext( &hProv,
NULL,
NULL,//换成"Microsoft Base Cryptographic Provider v1.0",//"Microsoft Strong Cryptographic
//Provider"等别的csp都没用。
PROV_RSA_FULL,
0 ) )
{
printError("error");//返回结果是: keyset does not exist
return 0;
}
我查了下2000和2003,上述几个csp都支持。。。不知道错在哪里了,为什么xp却可以正常的运行