Solved

DNS returns WSANO_DATA. Reason ?

Posted on 1997-07-10
7
1,295 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
ID: 1546777
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
ID: 1546778
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
ID: 1546779
ask in the programming section
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:pangofil
ID: 1546780
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
ID: 1546781
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
ID: 1546782
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
ID: 1546783
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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