|
-
May 28th, 1999, 02:23 AM
#1
winsock version
I want to know the windows' winsock version, 1.1 or 2.0. Which API can I use?
-
May 28th, 1999, 02:44 PM
#2
Re: winsock version
You can tell by using WSAStartup. Since you are asking for a specific version, you can ask for version 2.0. You must check the result and make sure there is no error. In case of an incorrect version you will get "WSAVERNOTSUPPORTED". You get the current version in the WSAData.
Example:
result = WSAStartup(ver,&WSAData);
if ( result!=0 )
if ( result == WSAVERNOTSUPPORTED ) {
// failed due to incorrect version.
// WSAData.wVersion contains the version using LO/HI WORD.
}
bye,
Amir.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|