title: Different behavior in connecting to port 0 in windows 2008 32/64 bit
body: <p>When I run the below code in windows 2008 32 bit server, program flow goes to sckTest_Error() when connect() is called.</p>
  
  <p>But when I run the same code in windows 2008 64 bit server, RTE occurs and program flow goes to error:</p>
  
  <pre><code>Private Sub Form_Load()
  On Error GoTo error1
       If (Not (Me.sckTest.State = sckConnected)) Then
          '
          'Log event for outbound client mode connectoin
  
          If Me.sckTest.State &lt;&gt; sckClosed Then
              Me.sckTest.Close
          End If
          '
          MsgBox "Going to connect"
          Me.sckTest.Connect "127.0.0.1", 0
          MsgBox "Connecting"
         If Me.sckTest.State = sckConnected Then
          MsgBox "Connected"
         End If
          '
      End If
      Exit Sub
  error1:
      MsgBox "RTE " &amp; Err.Number
  End Sub
  
  
  Private Sub sckTest_Error(ByVal Number As Integer, 
                            Description As String, 
                            ByVal Scode As Long, 
                            ByVal Source As String, 
                            ByVal HelpFile As String, 
                            ByVal HelpContext As Long, 
                            CancelDisplay As Boolean)
      MsgBox "Error in connecting" &amp; Number
  End Sub
  </code></pre>
  
  <p>But I get error as 10049 in both servers. Can any please advice its the problem with my code or server behavior.</p>
  
  <p>Thanks</p>