部分代码如下:#include <stdio.h>
#include <windows.h>
#include <wincrypt.h>
#define MY_TYPE  (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING)#define SIGNER_NAME  L"Insert_signer_name_here"
#define CERT_STORE_NAME  L"MY"
void MyHandleError(char *s);
void main(void)
{
HCERTSTORE hStoreHandle;
BYTE* pbMessage =
        (BYTE*)"CryptoAPI is a good way to handle security";
DWORD cbMessage =strlen((char*) pbMessage)+1;
PCCERT_CONTEXT pSignerCert;
CRYPT_SIGN_MESSAGE_PARA  SigParams;
DWORD cbSignedMessageBlob;
BYTE  *pbSignedMessageBlob;
DWORD cbDecodedMessageBlob;
BYTE  *pbDecodedMessageBlob;
CRYPT_VERIFY_MESSAGE_PARA VerifyParams;
.........................
编译错误如下:
E:\hello\hello.c(14) : error C2065: 'HCERTSTORE' : undeclared identifier
E:\hello\hello.c(14) : error C2146: syntax error : missing ';' before identifier 'hStoreHandle'
E:\hello\hello.c(14) : error C2065: 'hStoreHandle' : undeclared identifier
E:\hello\hello.c(15) : error C2275: 'BYTE' : illegal use of this type as an expression
        d:\program files\microsoft visual studio\vc98\include\windef.h(143) : see declaration of 'BYTE'
E:\hello\hello.c(15) : error C2065: 'pbMessage' : undeclared identifier
E:\hello\hello.c(17) : error C2275: 'DWORD' : illegal use of this type as an expression
        d:\program files\microsoft visual studio\vc98\include\windef.h(141) : see declaration of 'DWORD'
E:\hello\hello.c(17) : error C2146: syntax error : missing ';' before identifier 'cbMessage'
E:\hello\hello.c(17) : error C2065: 'cbMessage' : undeclared identifier
E:\hello\hello.c(18) : error C2065: 'PCCERT_CONTEXT' : undeclared identifier
E:\hello\hello.c(18) : error C2146: syntax error : missing ';' before identifier 'pSignerCert'
E:\hello\hello.c(18) : error C2065: 'pSignerCert' : undeclared identifier
E:\hello\hello.c(19) : error C2065: 'CRYPT_SIGN_MESSAGE_PARA' : undeclared identifier
E:\hello\hello.c(19) : error C2146: syntax error : missing ';' before identifier 'SigParams'
E:\hello\hello.c(19) : error C2065: 'SigParams' : undeclared identifier
E:\hello\hello.c(20) : error C2275: 'DWORD' : illegal use of this type as an expression
        d:\program files\microsoft visual studio\vc98\include\windef.h(141) : see declaration of 'DWORD'
E:\hello\hello.c(20) : error C2146: syntax error : missing ';' before identifier 'cbSignedMessageBlob'
E:\hello\hello.c(20) : error C2065: 'cbSignedMessageBlob' : undeclared identifier是不是没有某些参数的定义,还是没有API的引用?高手帮帮忙谢谢