VC6下不认识LPFN_CONNECTEX怎么办?

chengwei02 2009-03-14 05:19:23
听说要使用什么SDK,是这样吗?
怎么解决?
...全文
291 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
执假以为真 2009-03-16
  • 打赏
  • 举报
回复
珍惜生命,远离VC6
chengwei02 2009-03-16
  • 打赏
  • 举报
回复
no one knows?
ForestDB 2009-03-16
  • 打赏
  • 举报
回复
嗯,要SDK的头文件。
UndefinedCoder 2009-03-16
  • 打赏
  • 举报
回复
MSDN里查ConnectEx就有了。
arong1234 2009-03-16
  • 打赏
  • 举报
回复
在mswsock.h中?那你安装sdk没有?
chengwei02 2009-03-16
  • 打赏
  • 举报
回复
为啥这么严重?
  • 打赏
  • 举报
回复
帮up
chengwei02 2009-03-14
  • 打赏
  • 举报
回复
关键是LPFN_CONNECTEX不认识
  • 打赏
  • 举报
回复
这是啥东西?
我这VS2008的MSDN也没找到这个
chin_chen 2009-03-14
  • 打赏
  • 举报
回复
先定义一个LPFN_CONNECTEX指针,然后通过WSAIoctl获得函数地址。参考:

LPFN_CONNECTEX lpfnConnectEx = NULL; // a pointer to the 'ConnectEx() ' function
GUID GuidConnectEx = WSAID_CONNECTEX; // The Guid

Once the socket is created, we have to bind it to a port and interface. While using 'ConnectEx() ', binding has to be done explicitly because the main purpose of this API other than allowing overlapped calls is, performance.

dwErr = WSAIoctl(cliSock,
SIO_GET_EXTENSION_FUNCTION_POINTER,
&GuidConnectEx,
sizeof(GuidConnectEx),
&lpfnConnectEx,
sizeof(lpfnConnectEx),
&dwBytes,
NULL,
NULL);
if(dwErr == SOCKET_ERROR)
// Handle the error using 'WSAGetLastError() '

From: http://www.codeguru.com/forum/archive/index.php/t-312668.html

http://www.gamedev.net/community/forums/topic.asp?topic_id=323809

65,187

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧