10038 Error Code
Contents |
Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office socket error codes linux Word/Excel/PowerPoint Microsoft Graph Outlook OneDrive/Sharepoint Skype Services Store Cortana Bing what is a socket error Application Insights Languages & platforms Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F# Server socket error 10053 Windows Server SQL Server BizTalk Server SharePoint Dynamics Programs & communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows Dev Center
Socket Error 10054 Connection Reset By Peer
Windows Dev Center Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started socket error 10049 Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Networking and Internet Windows Sockets 2 Winsock Reference Winsock Reference Windows Sockets Error Codes Windows Sockets Error Codes Windows Sockets Error Codes Socket Options Winsock IOCTLs Winsock Annexes Winsock Enumerations Winsock Functions Winsock Structures and Typedefs Winsock Tracing Events Winsock SPI Windows Sockets Error Codes TOC Collapse the table of content Expand the table of content This documentation is archived
One games Xbox 360 games PC socket error 11004 games Windows games Windows phone games Entertainment All
Socket Error 10022
Entertainment Movies & TV Music Business & Education Business Students &
Socket Error 10061 Connection Refused
educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft https://support.microsoft.com/en-us/kb/819124 Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
here for a quick overview of the site Help Center Detailed answers http://stackoverflow.com/questions/22999063/c-udp-10038-socket-error-on-sendto to any questions you might have Meta Discuss the workings http://www.masmforum.com/board/index.php?PHPSESSID=786dd40408172108b65a5a36b09c88c0&topic=7243.0 and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack socket error Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up c++ udp 10038 socket error on sendto() up vote 0 down vote favorite I'm getting a 10038 socket error on a sendto() call. What 10038 error code could be causing this? I'm not getting any errors upon socket creation or binding. Here's how I set up my socket: Client client; client.client_socket = client.open_port(PEER_PORT2); //5001 client.prompt("Enter the router hostname: ",router); client.sa_out = client.prepare_peer_connection(router, ROUTER_PORT2); //7001 open_port SOCKET Client::open_port(int port) { SOCKET sock; SOCKADDR_IN sa; HOSTENT *hp; char hostname[11]; gethostname(hostname,11); if((hp=gethostbyname(hostname)) == NULL) throw "Could not determine a host address from supplied name"; sa.sin_family = AF_INET; sa.sin_port = htons(port); sa.sin_addr.s_addr = htonl(INADDR_ANY); if((sock = socket(AF_INET,SOCK_DGRAM,0))==INVALID_SOCKET) throw "Generating a new local socket failed"; if (bind(sock,(LPSOCKADDR)&sa,sizeof(sa)) == SOCKET_ERROR) throw "Could not bind socket to supplied port"; return sock; } prepare_peer_connection SOCKADDR_IN Client::prepare_peer_connection(char* hostname, int port) { SOCKADDR_IN sa; HOSTENT *hp; if((hp = gethostbyname(hostname)) == NULL) throw "Could not determine a host address from supplied name"; memcpy(&sa_out.sin_addr, hp->h_addr, hp->h_length); sa.sin_family = hp->h_addrtype; sa.sin_port = htons(port); return sa; } The function with the sendTo() call causing the 10038 int Client::send_packet(SOCKET sock, SOCKA
Links and Website Archived Old Forum Files Links for VC and MASM 128553 Posts in 15254 Topics by 684 Members Latest Member: mottt The MASM Forum Archive 2004 to 2012 General Forums The Workshop (RESOLVED thanks tedd)Winsock Error Code: 10038 « previous next » Pages: [1] 2 Author Topic: (RESOLVED thanks tedd)Winsock Error Code: 10038 (Read 10652 times) blackwc Guest (RESOLVED thanks tedd)Winsock Error Code: 10038 « on: May 06, 2007, 05:28:56 AM » Code:scan proc uses edi invoke socket,AF_INET,SOCK_STREAM,0 .if eax != INVALID_SOCKET mov sock,eax .else invoke MessageBox,hwnd,NULL,addr error,MB_ICONERROR .endif invoke WSAAsyncSelect,sock,hwnd,WM_SOCKET,FD_CONNECT .if eax==SOCKET_ERROR invoke MessageBox,hwnd,NULL,addr error,MB_ICONERROR .endif ;------------------------------------ invoke GetWindowTextLength,hbox1 inc eax invoke GetWindowText,hbox1,addr target,eax ;------------------------------------ assume edi:ptr sockaddr_in mov [edi].sin_family, AF_INET invoke inet_addr,addr target mov [edi].sin_addr, eax invoke htons,80 mov [edi].sin_port,ax invoke connect,sock,edi,sizeof sockaddr_in .if eax==SOCKET_ERROR invoke WSAGetLastError invoke dwtoa,eax,addr buffer .if eax != WSAEWOULDBLOCK invoke MessageBox,hwnd,addr buffer,addr error,MB_ICONERROR .endif .else invoke closesocket,sock .if eax==SOCKET_ERROR invoke WSAGetLastError invoke MessageBox,hwnd,addr target,addr error,MB_OK .endif .endif assume edi:nothing retscan endpRight around "connect()" it returns 10038.Which is invalid or corrupt handle, What's wrong with it? « Last Edit: May 10, 2007, 06:24:02 PM by blackwc » Logged blackwc Guest Re: Winsock Error Code: 10038 « Reply #1 on: May 07, 2007, 06:12:20 PM » Any help would be greatly appreciated... Logged Tedd Procrastinator Extraordinaire Member Posts: 2210 Reality Bytes Re: Winsock Error Code: 10038 « Reply #2 on: May 07, 2007, 07:14:15 PM » Well you're checking for errors (good!) and displaying error message boxes (good) and then carrying on anyway (not good!!)If there's an error, then it's not a good idea to continue - you'll only get more errors (such as 10038: WSAENOTSOCK - which means the socket handle you're giving isn't a valid socket handle.) Logged No snowflake in an avalanche feels responsible. blackwc Guest Re: Winsock Error Code: 10038 « Reply #3 on: May 07, 2007, 09:32:58 PM » Quote from: Tedd o