Can't compile an aplication with WinHTTP
-
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
-
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
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
-
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
See http://www.codeguru.com/forum/archive/index.php/t-346659.html maybe it is some helpful to you
_**
**_
WhiteSky