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

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

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

[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 614
活跃值: (883)
能力值: ( LV3,RANK:30 )
在线值:
发帖
回帖
粉丝
2
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
2010-9-27 14:34
0
游客
登录 | 注册 方可回帖
返回
//