WSAEADDRNOTAVAIL (10049) Cannot assign requested address. The requested address is not valid in its context. Normally results from an attempt to bind to an address that is not valid for the local machine, or connect/sendto an address or port that is not valid for a remote machine (e.g. port 0). 请求地址无效。

解决方案 »

  1.   

    其他参MSDN:
    List of WinSock 2 Error Messages 
    ID: Q199485
      

  2.   

    加入这个,你就知道出错代码对应的语言表示了(于你的工程默认语言相同的语言)
    LPVOID lpMsgBuf;
    FormatMessage( 
        FORMAT_MESSAGE_ALLOCATE_BUFFER | 
        FORMAT_MESSAGE_FROM_SYSTEM | 
        FORMAT_MESSAGE_IGNORE_INSERTS,
        NULL,
        GetLastError(),
        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
        (LPTSTR) &lpMsgBuf,
        0,
        NULL 
    );
    // Process any inserts in lpMsgBuf.
    // ...
    // Display the string.
    MessageBox((LPCTSTR)lpMsgBuf);
    // Free the buffer.
    LocalFree( lpMsgBuf );
      

  3.   

    谢谢各位,我在这里找到详细的说明了,或者这里的说明对大家有点用http://support.microsoft.com/default.aspx?scid=http%3a%2f%2fwww.microsoft.com%2fCHINA%2fsupport%2fxmlkb%2fchs199485.asp
      

  4.   

    VC IDE中有工具Error LookUp