[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: #define _WIN32_WINNT 0x0400
From:       "Strader, Scott" <scott_strader () ATLANTA ! STERCOMM ! COM>
Date:       1999-02-19 18:53:09
[Download RAW message or body]


The _WIN32_WINNT define just makes sure that you are using the correct
defines and includes from the proper headers.

Concerning the crash you are getting, what exactly happens when you say
"crash?" Try stepping through the code to determine which function
causes the crash. Then check the values for all of the parameters you
are passing in to the problem call. Also, check the return values for
previous call to make sure that your code hasn't continued past an
error.

My guess is that on the second call to one of the functions that expects
memory to be allocated, you are passing an invalid pointer or a pointer
to insufficient memory.

Scott D. Strader
Sterling Commerce
scott_strader@atlanta.stercomm.com
phone: 770-206-5630


> -----Original Message-----
> From: Maria Rosu [SMTP:mary@SNARE.COM]
> Sent: Friday, February 19, 1999 1:08 PM
> To:   CryptoAPI@DISCUSS.MICROSOFT.COM
> Subject:      #define _WIN32_WINNT 0x0400
>
> Hi All.
>
> WinNT 4.0 SP 4, VC++ 6.0
>
> I tried to include into my program the example at
> http://msdn.microsoft.com/library/sdkdoc/crypto/1using_7rn8.htm
> (which is very similar to the one provided by MSDN help for
> CryptExportPublicKeyInfo,  Certificate Request Example Code).
> I got a bunch of compile errors, because none of the structures
> defined in
> wincrypt.h were known.
> Then I noticed that wincrypt.h begins with
> #if(_WIN32_WINNT >= 0x0400)
> and I assumed that the condition above is not fulfiled.
> So I inserted into my .cpp file the line
> #define _WIN32_WINNT 0x0400
>
> Now I could build the executable.
> I wonder what _WIN32_WINNT >= 0x0400 means???
>
> Anyway, the help says that
> CryptExportPublicKeyInfo
> "Requires version 4.0 SP3 or later. Available also in IE 3.02 and
> later."
> I assume that WINNT 4.0 SP4 should be good enough.
>
> The program crashes when executed.
>
> If anyone has any idea, please help.
>
> Thanks!
> Mary.
>
> ----------------------------------------------------------------
> Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time,
> search
> the archives at http://discuss.microsoft.com/archives/index.html

----------------------------------------------------------------
Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic