winapi - Socket creation (::socket) fails on Windows - error 10038 (WSAENOTSOCKET) -


we're seeing strange behavior in windows application on systems. socket creation of sudden begins fail error 10038. happens on attempt allocate socket windows api, before connections on take place:

s = ::socket(af_inet, sock_stream, ipproto_tcp); if (s == (socket) -1) {     // wsagetlasterror() returns 10038 here (wsanotsocket) } 

sometimes program code works fine hours. when failure occurs, subsequent attempts create sockets fail same error. when process restarted, works once, , fails again.

how possible ? microsoft doesn't mention wsanotsocket error condition ::socket failure, , doesn't make sense.

i tried examining running program process explorer , process monitor, , there nothing stands out. process not have many handles, , overall number of tcp connections on system small. there no obvious third-party network layers in tcp stack, , tried exclude except ipv4, , didn't help. there nothing in event log, , system otherwise behaves normally.

the os windows 8.1 embedded.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -