【问题标题】:Error 57 - what does it mean?错误 57 - 这是什么意思?
【发布时间】:2015-06-19 15:00:41
【问题描述】:

有人知道错误代码 57 是什么意思吗?我查看了谷歌,但它告诉我这是网卡错误 - 我不确定这是怎么可能的。运行此函数时出现错误:

if (CryptVerifySignature(
    hHash,
    signatureContents,
    dwSigLen,
    phKey,
    NULL,
    0))
{
    printf("The signature has been verified.\n");
}
else
{
    MyHandleError("Error during CryptVerifySignature.");
}

MyHandleError

void MyHandleError(char *s)
{
fprintf(stderr, "An error occurred in running the program. \n");
fprintf(stderr, "%s\n", s);
fprintf(stderr, "Error number %x.\n", GetLastError());
fprintf(stderr, "Program terminating. \n");
exit(1);

}

【问题讨论】:

  • 在 MSDN 中查看 CryptVerifySignature 下的错误代码。
  • error message 说什么?

标签: c++


【解决方案1】:

您收到的错误实际上是 87,这意味着“参数不正确。”

您得到 57,因为您将其打印为十六进制值(%x 而不是 %d)。 57(16) = 87(10)

根据MSDNERROR_INVALID_PARAMETER One of the parameters contains a value that is not valid. This is most often a pointer that is not valid.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-29
    • 2011-03-01
    相关资源
    最近更新 更多