CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2001
    Location
    Madrid-Spain
    Posts
    1,123

    Question Errors compiling wincrypt.h

    Hi! I have downloaded Microsoft SDK, and this is my code:

    Code:
    #include "stdafx.h"
    #define _WIN32_WINNT 0x0400
    
    #include <stdio.h>
    #include <windows.h>
    #include <wincrypt.h>
    And when I compile I get these errors:

    c:\program files\microsoft sdk\include\wincrypt.h(249) : error C2146: syntax error : missing ';' before identifier 'HCRYPTPROV'
    c:\program files\microsoft sdk\include\wincrypt.h(249) : fatal error C1004: unexpected end of file found

    Any idea? Thank you in advance.
    I am Miss Maiden... Miss Iron Maiden :-D

  2. #2
    Join Date
    Nov 2001
    Location
    Beyond Juslibol
    Posts
    1,688
    Have you checked all #include directives are OK?

  3. #3
    Join Date
    May 2001
    Location
    Madrid-Spain
    Posts
    1,123
    Hi Doctor
    I don't know if I need to include some directive more.

    The error happens in this line:
    typedef ULONG_PTR HCRYPTPROV;

    Thank you for your answers.
    I am Miss Maiden... Miss Iron Maiden :-D

  4. #4
    Join Date
    Nov 2001
    Location
    Beyond Juslibol
    Posts
    1,688
    maybe I have an older wincrypt.h file. I have

    typedef unsigned long HCRYPTPROV; and not in the line 249.

    Sorry.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured