能力值:
( LV12,RANK:779 )
|
-
-
2 楼
"BOOLAPI" 将被替换为 "INTERNETAPI BOOL WINAPI"
|
能力值:
( LV9,RANK:140 )
|
-
-
3 楼
谢谢了
我写一个程序
#include <wininet.h>
void main()
{}
编译不通过,提示:
c:\program files\microsoft visual studio\vc98\include\wininet.h(48) : error C2146: syntax error : missing ';' before identifier 'HINTERNET'
c:\program files\microsoft visual studio\vc98\include\wininet.h(48) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
#if !defined(_WININET_)
#define _WININET_
/*
* Set up Structure Packing to be 4 bytes
* for all wininet structures
*/
#pragma pack(push, wininet, 4)
#if defined(__cplusplus)
extern "C" {
#endif
#if !defined(_WINX32_)
#define INTERNETAPI DECLSPEC_IMPORT
#define URLCACHEAPI DECLSPEC_IMPORT
#else
#define INTERNETAPI
#define URLCACHEAPI
#endif
#define BOOLAPI INTERNETAPI BOOL WINAPI
//
// internet types
//
typedef LPVOID HINTERNET; 这里是48行
typedef HINTERNET * LPHINTERNET;
typedef WORD INTERNET_PORT;
typedef INTERNET_PORT * LPINTERNET_PORT;
//
// Internet APIs
//
//
// manifests
//
#define INTERNET_INVALID_PORT_NUMBER 0 // use the protocol-specific default
#define INTERNET_DEFAULT_FTP_PORT 21 // default for FTP servers
#define INTERNET_DEFAULT_GOPHER_PORT 70 // " " gopher "
#define INTERNET_DEFAULT_HTTP_PORT 80 // " " HTTP "
#define INTERNET_DEFAULT_HTTPS_PORT 443 // " " HTTPS "
#define INTERNET_DEFAULT_SOCKS_PORT 1080
高手看下,是怎么回事,我想这个头文件是微软程序员写的,怎么会错呢,那是我写的有问题吧,究竟是错在哪里了呢
|
能力值:
( LV9,RANK:460 )
|
-
-
4 楼
由于你未包含windows.h文件,所以LPVOID这个符号未定义,因此typedef LPVOID HINTERNET;出错。
|
能力值:
( LV9,RANK:140 )
|
-
-
5 楼
谢谢了大哥,果然是没有包含Windows.h文件的原因
|
|
|