首页
社区
课程
招聘
[旧帖] wininet编程中的InternetReadFile() 0.00雪花
2010-9-27 08:54 6465

[旧帖] wininet编程中的InternetReadFile() 0.00雪花

2010-9-27 08:54
6465
如果用socket编写的服务端给wininet编写的客户端发数据,怎么指定数据的大小,遇到的问题就是InternetReadFile()不知道接收数据的大小,会一直在那等数据,通过什么可以告诉它传送数据的大小

[培训]内核驱动高级班,冲击BAT一流互联网大厂工 作,每周日13:00-18:00直播授课

收藏
点赞0
打赏
分享
最新回复 (1)
雪    币: 614
活跃值: (693)
能力值: ( LV3,RANK:30 )
在线值:
发帖
回帖
粉丝
eastmaster 2010-9-27 14:34
2
0
BOOL WINAPI InternetReadFile(
  HINTERNET hFile,
  LPVOID lpBuffer,
  DWORD dwNumberOfBytesToRead,
  LPDWORD lpdwNumberOfBytesRead
);
Parameters
hFile
[in ] Valid handle returned from a previous call to InternetOpenUrl, FtpOpenFile, or HttpOpenRequest.
lpBuffer
[in] Long pointer to a buffer that receives the data read.
dwNumberOfBytesToRead
[in] Specifies the number of bytes to read.
lpdwNumberOfBytesRead
[out] Long pointer to a variable that receives the number of bytes read. InternetReadFile sets this value to zero before doing any work or error checking.
Return Values
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. An application can also use InternetGetLastResponseInfo when necessary.

摘自MSDN
游客
登录 | 注册 方可回帖
返回