Questions tagged [wsastartup]

WSAStartup function is used by process to initiate use of the Winsock DLL

52 questions
0
votes
2 answers

How to call WSAStartup() in C# (on Windows Phone 7)?

Goal: getting a Windows Phone 7 name (like, "My Windows Phone"). Lead: http://blogs.msdn.com/b/andypennell/archive/2013/11/09/getting-the-name-of-your-windows-phone-8-device.aspx The above code is provided as C++, and I would like to change it to…
Cœur
  • 32,421
  • 21
  • 173
  • 232
0
votes
3 answers

C++: gethostname() failing

I need to get the system host name for which I am using gethostname function But its failing with error code 10093 which is WSANOTINITIALISED 10093 Successful WSAStartup not yet performed. Either the application has not called WSAStartup or…
foobar
  • 2,596
  • 1
  • 22
  • 48
0
votes
1 answer

Static wrapper library (for winsock), undefined reference to XXX

I want to write a static library which uses functions from the winsock api (a winsock wrapper library). I include libws2_32.a and add compiler option -lws2_32. Now when I link to this library in another project, it gives me these errors: undefined…
user3665318
  • 11
  • 1
  • 2
0
votes
1 answer

Buggy call to WSACleanup() kills WSAStartup()

I have application that is running TCP server. To initialize TCP I run WSAStartup(). Then I need to load third party dll. Dll is also does some TCP job and has some bug - it runs WSACleanup() without running WSAStartup(). This bug brakes my TCP…
vico
  • 13,725
  • 30
  • 108
  • 237
0
votes
1 answer

Error 10038 on winsock connect method

I'm trying to setup a simple connection with a server app running on the same computer as the client. My code looks like this: void Base::Connect(string ip, string port) { int status; SOCKET ConnectSocket = INVALID_SOCKET; struct…
Dries
  • 875
  • 2
  • 12
  • 38
0
votes
1 answer

WSAStartup failed

Hej, We have a weird problem with our software. We have a custom middleware that communicates through sockets. It run's succesfully on 50+ servers, clusters, both 2003 and 2008 OS. Sometimes depending on the wish of the developer that uses our…
msjonathan
  • 434
  • 2
  • 10
  • 26
-4
votes
1 answer

Questions about Winsock 2

WSADATA wsaData; SOCKET ConnectSocket = INVALID_SOCKET; iResult = WSAStartup(MAKEWORD(2,2), &wsaData); WSADATA is info, but what info is it specifically? WSAStartup is a function to initiate WS2_32.dll. What is the difference between initiating…
1 2 3
4