Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Can't compile an aplication with WinHTTP

Can't compile an aplication with WinHTTP

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eugene Pustovoyt
    wrote on last edited by
    #1

    Hello guys. It's my first application with WinHTTP. Please help me to fix an error. This errors occurs after include "winhttp.h" file to stdafx.h of my application: StdAfx.h: #ifndef VC_EXTRALEAN #define VC_EXTRALEAN #endif #ifndef WINVER #define WINVER 0x0501 #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #ifndef _WIN32_WINDOWS #define _WIN32_WINDOWS 0x0410 #endif #ifndef _WIN32_IE #define _WIN32_IE 0x0600 #endif #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS #define _AFX_ALL_WARNINGS #include <afxwin.h> #include <afxext.h> #include <afxdisp.h> #include <afxdtctl.h> #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> #endif // _AFX_NO_AFXCMN_SUPPORT #include <winhttp.h> When I complile this application then I gets following list of the errors: ..\winhttp.h(285): error C2065: '__in' : undeclared identifier ..\winhttp.h(285): error C2143: syntax error : missing ')' before 'const' ..\winhttp.h(285): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(285): error C2491: 'WinHttpTimeFromSystemTime' : definition of dllimport data not allowed ..\winhttp.h(287): error C2059: syntax error : ')' ..\winhttp.h(292): error C3861: '__in': identifier not found, even with argument-dependent lookup ..\winhttp.h(292): error C2146: syntax error : missing ')' before identifier 'LPCWSTR' ..\winhttp.h(292): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(292): error C2491: 'WinHttpTimeToSystemTime' : definition of dllimport data not allowed ..\winhttp.h(294): error C2059: syntax error : ')' ..\winhttp.h(313): error C2065: 'dwUrlLength' : undeclared identifier ..\winhttp.h(313): error C3861: '__in_ecount': identifier not found, even with argument-dependent lookup ..\winhttp.h(313): error C2146: syntax error : missing ')' before identifier 'LPCWSTR' ..\winhttp.h(313): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(313): error C2491: 'WinHttpCrackUrl' : definition of dllimport data not allowed ..\winhttp.h(317): error C2059: syntax error : ')' ..\winhttp.h(322): error C3861: '__in': identifier not found, even with argument-dependent lookup ..\winhttp.h(322): error C2146: syntax error : missing ')' before identifier 'LPURL_COMPONENTS' ..\winhttp.h(322): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(322): error C2491: 'WinHttpCreateUrl' : definition of dllimport data not allowed ..\win

    P H 2 Replies Last reply
    0
    • E Eugene Pustovoyt

      Hello guys. It's my first application with WinHTTP. Please help me to fix an error. This errors occurs after include "winhttp.h" file to stdafx.h of my application: StdAfx.h: #ifndef VC_EXTRALEAN #define VC_EXTRALEAN #endif #ifndef WINVER #define WINVER 0x0501 #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #ifndef _WIN32_WINDOWS #define _WIN32_WINDOWS 0x0410 #endif #ifndef _WIN32_IE #define _WIN32_IE 0x0600 #endif #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS #define _AFX_ALL_WARNINGS #include <afxwin.h> #include <afxext.h> #include <afxdisp.h> #include <afxdtctl.h> #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> #endif // _AFX_NO_AFXCMN_SUPPORT #include <winhttp.h> When I complile this application then I gets following list of the errors: ..\winhttp.h(285): error C2065: '__in' : undeclared identifier ..\winhttp.h(285): error C2143: syntax error : missing ')' before 'const' ..\winhttp.h(285): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(285): error C2491: 'WinHttpTimeFromSystemTime' : definition of dllimport data not allowed ..\winhttp.h(287): error C2059: syntax error : ')' ..\winhttp.h(292): error C3861: '__in': identifier not found, even with argument-dependent lookup ..\winhttp.h(292): error C2146: syntax error : missing ')' before identifier 'LPCWSTR' ..\winhttp.h(292): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(292): error C2491: 'WinHttpTimeToSystemTime' : definition of dllimport data not allowed ..\winhttp.h(294): error C2059: syntax error : ')' ..\winhttp.h(313): error C2065: 'dwUrlLength' : undeclared identifier ..\winhttp.h(313): error C3861: '__in_ecount': identifier not found, even with argument-dependent lookup ..\winhttp.h(313): error C2146: syntax error : missing ')' before identifier 'LPCWSTR' ..\winhttp.h(313): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(313): error C2491: 'WinHttpCrackUrl' : definition of dllimport data not allowed ..\winhttp.h(317): error C2059: syntax error : ')' ..\winhttp.h(322): error C3861: '__in': identifier not found, even with argument-dependent lookup ..\winhttp.h(322): error C2146: syntax error : missing ')' before identifier 'LPURL_COMPONENTS' ..\winhttp.h(322): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(322): error C2491: 'WinHttpCreateUrl' : definition of dllimport data not allowed ..\win

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Eugene Pustovoyt wrote:

      error C2065: '__in' : undeclared identifier

      what version of visual studio you are using. It seems __in definition is present in VC7 and VC8.

      Prasad Notifier using ATL

      1 Reply Last reply
      0
      • E Eugene Pustovoyt

        Hello guys. It's my first application with WinHTTP. Please help me to fix an error. This errors occurs after include "winhttp.h" file to stdafx.h of my application: StdAfx.h: #ifndef VC_EXTRALEAN #define VC_EXTRALEAN #endif #ifndef WINVER #define WINVER 0x0501 #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #ifndef _WIN32_WINDOWS #define _WIN32_WINDOWS 0x0410 #endif #ifndef _WIN32_IE #define _WIN32_IE 0x0600 #endif #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS #define _AFX_ALL_WARNINGS #include <afxwin.h> #include <afxext.h> #include <afxdisp.h> #include <afxdtctl.h> #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> #endif // _AFX_NO_AFXCMN_SUPPORT #include <winhttp.h> When I complile this application then I gets following list of the errors: ..\winhttp.h(285): error C2065: '__in' : undeclared identifier ..\winhttp.h(285): error C2143: syntax error : missing ')' before 'const' ..\winhttp.h(285): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(285): error C2491: 'WinHttpTimeFromSystemTime' : definition of dllimport data not allowed ..\winhttp.h(287): error C2059: syntax error : ')' ..\winhttp.h(292): error C3861: '__in': identifier not found, even with argument-dependent lookup ..\winhttp.h(292): error C2146: syntax error : missing ')' before identifier 'LPCWSTR' ..\winhttp.h(292): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(292): error C2491: 'WinHttpTimeToSystemTime' : definition of dllimport data not allowed ..\winhttp.h(294): error C2059: syntax error : ')' ..\winhttp.h(313): error C2065: 'dwUrlLength' : undeclared identifier ..\winhttp.h(313): error C3861: '__in_ecount': identifier not found, even with argument-dependent lookup ..\winhttp.h(313): error C2146: syntax error : missing ')' before identifier 'LPCWSTR' ..\winhttp.h(313): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(313): error C2491: 'WinHttpCrackUrl' : definition of dllimport data not allowed ..\winhttp.h(317): error C2059: syntax error : ')' ..\winhttp.h(322): error C3861: '__in': identifier not found, even with argument-dependent lookup ..\winhttp.h(322): error C2146: syntax error : missing ')' before identifier 'LPURL_COMPONENTS' ..\winhttp.h(322): warning C4229: anachronism used : modifiers on data are ignored ..\winhttp.h(322): error C2491: 'WinHttpCreateUrl' : definition of dllimport data not allowed ..\win

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        See http://www.codeguru.com/forum/archive/index.php/t-346659.html maybe it is some helpful to you

        _**


        **_

        WhiteSky


        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups