#include "stdafx.h"
#include <stdio.h>
#include <wincrypt.h>FILE *hSource = NULL;
FILE *hDest = NULL;
int eof = 0;HCRYPTPROV hProv = 0;
HCRYPTKEY hKey = 0;
HCRYPTKEY hXchgKey = 0;#define BLOCK_SIZE 160
#define BUFFER_SIZE (BLOCK_SIZE+16) // Give buffer 16 bytes of extra
                                    // room for padding, and so forth.
BYTE pbBuffer[BUFFER_SIZE];
DWORD dwCount;BYTE *pbKeyBlob = NULL;
DWORD dwBlobLen;
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
  // TODO: Place code here.
// Open the source file that contains the data to be encrypted.
if((hSource=fopen("test1.txt","rb"))==NULL) {
    printf("Error opening source file!\n");
    goto done;
}// Open the destination file.
if((hDest=fopen("test1.xxx","wb"))==NULL) {
    printf("Error opening destination file!\n");
    goto done;
}// Get a handle to the default provider.
if(!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0)) {
    printf("Error %x during CryptAcquireContext!\n", GetLastError());
    goto done;
}
.................
我已经包了头文件<wincrypt.h>可是还是报没有定义CryptAcquireContext的错,这可是msdn的例题。我还有那里错了?
我是在win2000server上使用,请教高手!