Article View: cn.bbs.comp.program
Article #262ipx�������
From: high
Date: Tue, 12 Oct 1999 00:00
Date: Tue, 12 Oct 1999 00:00
34 lines
1284 bytes
1284 bytes
�����һ��IPX/SPX�ļ�ͨ�³���
the source code as follows:
#include "winsock2.h"
#include "wsipx.h"
............
void Init()
{
WORD wVersionRequested;
WSADATA wsaData;
wVersionRequested = MAKEWORD(2, 0);
if(WSAStartup(wVersionRequested, &wsaData) == SOCKET_ERROR)
{
return ;
}
SOCKET SrvSock = socket(AF_IPX, // IPX Family
SOCK_DGRAM, // Gives message mode transfers
NSPROTO_IPX); // SPX is connection oriented
transport
if(SrvSock==INVALID_SOCKET) {
AfxMessageBox("error");
return;
}
}
.......
WSAStartup()�ɹ�����
���ҵ���socket����(����),���Ƿ���INVALID_SOCKET,why?
ϣ���λָ��.
--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Technical Details
Message-ID:
<991012.11aqan$PBBS@bbs.ustc.edu.cn>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fc86e,9183083d849d3212,start X-Google-Attributes: gidfc86e,public From: Zhwj_Zhong@bbs.ustc.edu.cn (high) Subject: ipx������� Date: 1999/10/12 Message-ID: <991012.11aqan$PBBS@bbs.ustc.edu.cn> X-Deja-AN: 536367865 Distribution: ustc Organization: �й�ƴ�BBSվ Newsgroups: cn.bbs.comp.program