Solved

Winsock error : 10091

Posted on 1998-09-22
4
1,831 Views
Last Modified: 2008-03-10
I'm using Winsock 2 on my win95 and I got this error while I call WSAStartUp.
My value for LOBTYE(wVersionRequested) and HIBYTE(wVersionRequested) are both 2. The returned values in LPWSADATA seems to be okay to me, but WSAStartUp still returns with the value 10091. I'm sure the DLLs that
are used are the correct ones.
The documentations say this error means "network subsystem unusable". So what does it mean?
What else should I check?

Thanks.
0
Comment
Question by:totoro030898
4 Comments
 
LVL 1

Expert Comment

by:marvinm
ID: 1252975
WSASYSNOTREADY

(10091)

Network subsystem is unavailable.

This error is returned by WSAStartup if the Windows Sockets implementation cannot function at this time because the underlying system it uses to provide network services is currently unavailable. Users should check:

· that the appropriate Windows Sockets DLL file is in the current path,

· that they are not trying to use more than one Windows Sockets implementation simultaneously. If there is more than one WINSOCK DLL on your system, be sure the first one in the path is appropriate for the network subsystem currently loaded.

· the Windows Sockets implementation documentation to be sure all necessary components are currently installed and configured correctly

0
 
LVL 86

Accepted Solution

by:
jkr earned 150 total points
ID: 1252976
As there's no Winsock 2.2, use
wVersionRequested = MAKEWORD( 2, 0 );
err = WSAStartup( wVersionRequested, &wsaData );

specifying
wVersionRequested = MAKEWORD( 2, 2 );

will lead to an error until MS publishes Winsock 2.2 ;-)


0
 

Author Comment

by:totoro030898
ID: 1252977
Hi jkr,

In the Windows Sockets 2 Application Programming documentation (Revision 2.2.2, Aug 7 1997), there is an example under WSAStartup, pg 192, it shows :

    wVersionRequested = MAKEWORD( 2, 2 );

I have tried with MAKEWORD(1,1) which still gives me the error 10091.
The values returned to me in WSADATA.wVersion and WSADATA.wHighVersion are both 2.2.

FYI, what I did was I intercept the WSAStartup call to ws2_32.dll and logged the parameters. And I have used the Win95 Windows Sockets 2 setup(from Microsoft) to install winsock2 files onto my win95. Without the intercepting dll, everything works fine. But I'm sure the intercepting dll is coded correctly....

So what could be wrong ? I have increased another 50 points, please help if you can..... Thanks....

To: marvinm, thanks for your comment, I have read that before I posted this question, however, that's the point, I do not quite understand what is meant by "network subsystem unusable". And I have done the suggested checks. They all passed.
0
 
LVL 6

Expert Comment

by:snoegler
ID: 1252978
You said, without your intercepting dll it works ...
This sounds as if this is maybe really the problem, don't you think?
If it works without the dll, and it fails with the dll, where else could the problem reside?

Maybe you'd need to set the correct version number (like it is set in the original winsock.dll) ...
As Windows perhaps finds out the supported version using this resource, this could
probably be the cause why it only works with the original dll.
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Picking random number 8 175
Problem to ASCII 1 166
delete-remove 14 65
Memory going from 12gb to 64gb or 96gb. worth it? 15 138
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

864 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now