Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing API? 1

Status
Not open for further replies.

GhostWolf

Programmer
Jun 27, 2003
290
US
I'd used the GetHostByName API a few weeks ago, successfully, but now I'm getting an "entry point not found" error message for WSock32.dll. Any ideas on what might have happened?

I'm using VB6 sp6 on XP sp3, with all the latest updates.

Thinking I'd messed up something in the GetHostByName call, I added WSAStartup and WSACleanup calls - and got the same error.
 
Well, looks like another silly mistake.

I'm not getting the "entry point" error now - but I'm also not getting an IP address, even with the WSAStartup and WSACleanup calls.

aaaaaarrrrgggghhhh
.
 
Been there; no help. (Saw your link over in the VB 5/6 forum.)

 
Okay, now I'm stymied. I copied their code to another PC and ran it, and it gets the IP.

Looks like it's time to double-check my other code...

Thanks, vb5prgrmr. Once again, you've pointed the right direction.
 
Aha!! Found it! In case anyone else needs to know:

The source code I'd originally copied had two problems:
- it prepended the machine name with "\\"; and
- the second parameter of the CopyMemory call was being passed ByRef instead of ByVal.

Once I removed the qualifier from the name, and changed the call, it started working correctly.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top