Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WSAStartup()?

May
12,846
164
Do plugins need to call WSAStartup()? It would seem not, since I can call winsock functions without it. Can I rely on that?
 
On Wed, 02 Mar 2011 22:14:10 -0500, you wrote:

|---Quote (Originally by vefatica)---
|Do plugins need to call WSAStartup()? It would seem not, since I can call winsock functions without it. Can I rely on that?
|---End Quote---
|
|I certainly wouldn't rely on it. TCC doesn't call WSAStartup, so if you want to use an API that needs it, you'll have to do it yourself.

Hmmm! I have a plugin which successfully calls gethostbyname() without first
calling WSAStartup(). Could it be that IPWorks is starting up Winsock (and
leaving it started)?
 
Hmmm! I have a plugin which successfully calls gethostbyname() without first calling WSAStartup(). Could it be that IPWorks is starting up Winsock (and leaving it started)?

I have no idea. But you'd have to be crazy to rely on undocumented behavior by unknown third-party dll's! (And besides, it wouldn't work in TCC/LE, which doesn't load IPWorks.)
 
On Wed, 02 Mar 2011 23:03:49 -0500, you wrote:

|I have no idea. But you'd have to be crazy to rely on undocumented behavior by unknown third-party dll's!

Yeah! I put WSAStartup() back in.
 
Back
Top