Solved

DNS returns WSANO_DATA. Reason ?

Posted on 1997-07-10
7
1,253 Views
Last Modified: 2013-12-23
Hi.
Does somebody know what can be reason for follow :
gethosbyname() sometime returns WSANO_DATA, after I've used
Auto Connect feature in Win95.
If I start my program when PC is already connected
via DialUp - everything is OK.
TIA.

0
Comment
Question by:pangofil
  • 3
  • 3
7 Comments
 
LVL 3

Expert Comment

by:hpierson
Comment Utility
Are you using the Win95 Winsock?

When using any winsock, the first call is always to WSAStartup. This fills a structure with information about the winsock you are using, so that TCP/IP programs can be made aware of any limitations that exist with your winsock. The WSANO_DATA response comes when the winsock app looks to the WSAData structure, and finds that it has not been filled in completely.

It sounds like you program is starting before WSAStartup completes when you use autoconnect. Watch carefully and see if you can tell whether your program is starting before you see the login complete.

You might also check to make sure that when you right click the  internet icon, the information on the connection tab is correct.

Harry
0
 

Author Comment

by:pangofil
Comment Utility
Yes I'm using Win95 winsock.
And I call WSAStartup() before any network action.
And something else :
  I'm writing 16-bit program so i call 32-bit exe file,
  which performs some WinSock actions ( gethostbyname() )
  for autoconnecting (16-bit Winsock can't perform autoconnect).
  After host resolved the 32-bit app PostMessage about connecting
  result. After what 16-bit app continues ( tries to resolve host   etc ... ). And here ( after WSAStartup has completed )
  some time I get the problem, described above.
0
 
LVL 3

Expert Comment

by:Ikon
Comment Utility
ask in the programming section
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:pangofil
Comment Utility
Thanks for responses - I found out that's a problem.
That was becasuse I mixed 16-bit & 32-bit.
Must load 16-bit Winsock after AutoConnection has been completed.
0
 
LVL 3

Expert Comment

by:hpierson
Comment Utility
Sounds to me like I told you exactly where to look, doesn't it?

And the reason you rejected my answer is...?
0
 

Author Comment

by:pangofil
Comment Utility
To hpierson :
May be You're right.
I just didn't understand your answer ( it didn't help me to solve  the problem ).
Just answer again - I'll accept it.

PS : Sorry for nasty English - I'm working on it
0
 
LVL 3

Accepted Solution

by:
hpierson earned 100 total points
Comment Utility
Pangofil,

I hope I didn't come across the wrong way,...it seems from your solution that you realized that the problem was in the general area I described.

By the way, I have no problem with your English.


Best Regards,

Harry

Are you using the Win95 Winsock?

When using any winsock, the first call is always to WSAStartup. This fills a structure with information about the winsock you are using, so that TCP/IP programs can be made aware of any limitations that exist with your winsock. The WSANO_DATA response comes when the winsock app looks to the WSAData structure, and finds that it has not been filled in completely.

It sounds like you program is starting before WSAStartup completes when you use autoconnect. Watch carefully and see if you can tell whether your program is starting before you see the login complete.

You might also check to make sure that when you right click the internet icon, the information on the connection tab is correct.

Harry
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

17 Experts available now in Live!

Get 1:1 Help Now