下面一段程序,在Win2000/XP下可以执行,但在WIN98下执行时返回错误码0x80090019 - The keyset is not defined. 为什么?是因为WIN98没有包含什么组件吗?
if(!CryptAcquireContext(
&hProv,
"OnlyATest\0",//NULL,//"Michael",
MS_ENHANCED_PROV,
PROV_RSA_FULL,
CRYPT_MACHINE_KEYSET))
{
if(!CryptAcquireContext(
&hProv,
"OnlyATest\0",
MS_ENHANCED_PROV,
PROV_RSA_FULL,
(CRYPT_NEWKEYSET|CRYPT_MACHINE_KEYSET)))
{
printf("CryptAcquireContext错误,ErrorCode=%x。\n",
GetLastError());
exit(1);
}
}在WIN2000/XP下可以执行,在Win98下就返回ErrorCode=80090019,意思是“The keyset is not defined.”,怎么解决?
if(!CryptAcquireContext(
&hProv,
"OnlyATest\0",//NULL,//"Michael",
MS_ENHANCED_PROV,
PROV_RSA_FULL,
CRYPT_MACHINE_KEYSET))
{
if(!CryptAcquireContext(
&hProv,
"OnlyATest\0",
MS_ENHANCED_PROV,
PROV_RSA_FULL,
(CRYPT_NEWKEYSET|CRYPT_MACHINE_KEYSET)))
{
printf("CryptAcquireContext错误,ErrorCode=%x。\n",
GetLastError());
exit(1);
}
}在WIN2000/XP下可以执行,在Win98下就返回ErrorCode=80090019,意思是“The keyset is not defined.”,怎么解决?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货