Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with wincrypt.h

Status
Not open for further replies.

Vovin

Programmer
Aug 24, 2003
63
GB
Hi,

I copied and pasted some code off the Microsoft site i.e.
I then added Crypt32.lib and Advapi32.lib to the Link section of project settings. When I run the code I get 98 errors e.g.
c:\projects\revokecertconsoleapp\main.cpp(24) : error C2065: 'HCERTCHAINENGINE' : undeclared identifier

Where is 'HCERTCHAINENGINE' defined. I'm using Visual C++ 6, do I need a newer version of wincrypt.h?

I've written to Microsoft but they passed my query onto another department and have still to get back to me. Any help would be much appreciated. Thanks in advance.
 
I think you should include some of standard windows headers, for example windows.h

Ion Filipski
1c.bmp
 
I have included windows.h. I just copied and pasted the code that's on the Microsoft site.
 
It's in C:\Program Files\Microsoft Visual Studio\VC98\Include\
 
In this case, before any #include's put a:

#define _WIN32_WINNT 0x0500

Ion Filipski
1c.bmp
 
That helped slightly I now only have 85 errors. The first error is still:
c:\projects\revokecertconsoleapp\main.cpp(24) : error C2065: 'HCERTCHAINENGINE' : undeclared identifier

I did a search for 'HCERTCHAINENGINE' and few of the other types in the Visual C++ installation folder but couldn't find it defined anywhere.

The wincrypt.h has 'Copyright 1992 - 1998' at the top of it. COuld it be possible I have an old version of this. If so where would I get a newer version (without upgrading).
 
find the declaration of HCERTCHAINENGINE in wincrypt.h and see how it is declared, I think it is declared as handle, find the declaration fo handle and so on. On my computer I don't have problems with that code from MSDN. Maybe you should define STRICT or there could be one milion of reasons why your code does not compile.

Ion Filipski
1c.bmp
 
I had a look in Wincrypt.h and couldn't find HCERTCHAINENGINE or a lot of the other structures that are supposed to be there. I found a version of wincrypt.h on the web at:
This is vastly different to the one that comes with Visual C++ 6. I'm running windows XP would this make a difference?

At the moment I'm cutting and pasting structures and definitions from the Microsoft site (taking ages though and this stuff is supposed to be in wincrypt.h).
 
I think you have got a wrong wincrypt. I have a version of wincrypt.h, try to contact me directly.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top