Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Service Pack 3,4&5 Socket Setup and Problem

Posted on 1999-06-29
Medium Priority
Last Modified: 2010-04-13
Under NT4.0 SP3 the sequence of:
  WSAStartup(MAKEWORD(1,1), &data) / socket() / bind()
  worked fine.

We moved to NT4.0 SP4 and the above sequence failed.  We changed to:
  WSAStartup(MAKEWORD(2,1), &data) / socket() / bind()
  and this worked fine.

We have moved to NT4.0 SP5 and I cannot find any working combination.

Question: What's the difference between SP3, SP4 and SP5
and what do I have to do to get SP5 to work?
Question by:canyonsw
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1777545
Try MAKEWORD(2,0).  If that doesnt work try reading the version member of the stat structure.  I dont know what version of Winsock is built into NT 5.0, but the version member should tell you the proper version.

Accepted Solution

MaDdUCK earned 800 total points
ID: 1777546
this is the NT5 area, not the SP5 area. And this question should be in Windows Programming anyway. But whatever, after your WSAStartup call, check the version of the winsock library allocated:

// initialize winsock
if (WSAStartup(MAKEWORD(2,0), &wsadata) != 0)
  throw mdException::mdSocketException("failed to initialize the winsock subsystem.");
// check version
int maj = LOBYTE(wsadata.wVersion);
int min = HIBYTE(wsadata.wVersion);
std::cout << "winsock version " << maj << '.' << min << std::endl;
if (maj != 2 || min != 0)
  throw mdException::mdSocketException mdERR_SOCKWRONGVER, "failed to initialize requested version of the winsock subsystem.");

this will tell you the highest version that the program can find.

Expert Comment

ID: 6873336

This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.  You'll also find a link there for Experts who wish to participate in the cleanup effort of old and abandoned questions.
Thank you,
Moderator @ Experts Exchange

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question