GetAddrInfoW returns out of memory instead of host not found

  • Thread starter Thread starter mxmauro
  • Start date Start date
M

mxmauro

Guest
Hi, I created the following snippet to reproduce the issue:#define WIN32_LEAN_AND_MEAN #include <winsock2.h> #include <Ws2tcpip.h> #include <stdio.h> // Link with ws2_32.lib #pragma comment(lib, "Ws2_32.lib") int main() { WSADATA wsaData; ADDRINFOW hints; ADDRINFOW *result; int iResult; DWORD dwRetval; // Initialize Winsock iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); if (iResult != 0) { wprintf(L"WSAStartup failed: %d\n", iResult); return 1; } ZeroMemory( &hints, sizeof(hints) ); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM;

Continue reading...
 

Similar threads

Π
Replies
0
Views
8
Παναγιώτης Φακίτσας
Π
Π
Replies
0
Views
13
Παναγιώτης Φακίτσας
Π
Back
Top