[prev in list] [next in list] [prev in thread] [next in thread]
List: ms-cryptoapi
Subject: Re: Dumb Newbie Problems: Can't compile and execute CryptoAPI
From: "Tom (pandora.be)" <tom2001 () PANDORA ! BE>
Date: 2001-12-08 23:16:46
[Download RAW message or body]
Hello,
You will have to add something like this :
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#include <wincrypt.h>
If you don't define this, wincrypt.h is not seen and the compiler throws
errors.
Greetings,
Tom.
----- Original Message -----
From: "Bill Price" <wprice@MITRE.ORG>
To: <CryptoAPI@DISCUSS.MICROSOFT.COM>
Sent: Saturday, December 08, 2001 10:53 PM
Subject: Dumb Newbie Problems: Can't compile and execute CryptoAPI example
program
> I copied a program from one of the cryptoapi examples and tried to compile
> and run it but received errors. I haven't done this sort of thing for a
> while but haven't had difficulties previously.
>
> The example program was: Example C Program: Using CertOIDToAlgId and
> CertCompareIntegerBlob
> The listing is from:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/us
> ingcrypto_0ejm.asp
>
> I created a .c file containing the example code, tried to compile it, and
> accepted the creation of a default project workspace. I got 102 errors
> indicating that the compiler had problems with the wincrypt.h file. The
> error message points at the line in the wincrypt.h file:
>
> typedef ULONG_PTR HCRYPTPROV;
>
> The errors relating to that line are:
> c:\program files\microsoft visual studio\vc98\include\wincrypt.h(243) :
> error C2061: syntax error : identifier 'HCRYPTPROV'
> c:\program files\microsoft visual studio\vc98\include\wincrypt.h(243) :
> error C2059: syntax error : ';'
>
> I am running win 2k professional; vs 6 (Enterprise Ed) sp5; I have down
> loaded the latest platform sdk; the wincrypt.h file has a file date of
> 7/8/2001.
>
> Any suggestions on what I am doing wrong and the needed fix would be
> appreciated. Thanks.
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:CryptoAPI-signoff-request@DISCUSS.MICROSOFT.COM
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic