lamckh
May 28th, 1999, 02:23 AM
I want to know the windows' winsock version, 1.1 or 2.0. Which API can I use?
|
Click to See Complete Forum and Search --> : winsock version lamckh May 28th, 1999, 02:23 AM I want to know the windows' winsock version, 1.1 or 2.0. Which API can I use? amir May 28th, 1999, 02:44 PM 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. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |