title: IcmpSendEcho, Is there data limitation for this function?
body: <p>I called IcmpSendEcho in VB6 to test Ethernet protocol of one device. 
  MTU for Ethernet is 1500 bytes, so I tried to send 1500bytes, but VB6 won't let me do so.
  It only allows me to send 1014, and when I sent 1014 bytes, then IcmpSendEcho gives me error of General Failure. </p>
  
  <p>When I sent 250bytes, it worked fine, but if I send more than 250 byte, it gives me error (General Failure) </p>
  
  <p>I can't figure out the problem. Ethernet Protocol can handle upto 1500 bytes, but mine can't even go upto 250 bytes. Is there anyway to debug or solve this problem? </p>
  
  <pre><code>  Private Declare Function IcmpSendEcho Lib "icmp.dll" _
     (ByVal IcmpHandle As Long, _
      ByVal DestinationAddress As Long, _
      ByVal RequestData As String, _
      ByVal RequestSize As Long, _
      ByVal RequestOptions As Long, _
      ReplyBuffer As ICMP_ECHO_REPLY, _
      ByVal ReplySize As Long, _
      ByVal Timeout As Long) As Long
  
   Public Function ping(sAddress As String, Reply As ICMP_ECHO_REPLY) As Long
  
      Dim hIcmp As Long
  Dim lAddress As Long
  Dim lTimeOut As Long
  Dim StringToSend As String
  Dim PingOutput As String 'Variable that shows Ping status
  Dim Index As Integer
  
  
  'Short string of data to send
      '400byte
  StringToSend = "ddd...." 'First of all I can't put more than 1014 characters in string. 
                       'Secondly, "ddd..." is just example, putting 1014 will make it so messy
                       ' I declared  
  'ICMP (ping) timeout
  lTimeOut = 1000 'ms
  
  'Convert string address to a long representation.
  lAddress = inet_addr(sAddress)
  
  If (lAddress &lt;&gt; -1) And (lAddress &lt;&gt; 0) Then
  
  'Create the handle for ICMP requests.
  hIcmp = IcmpCreateFile()
  
  Do
  If hIcmp Then
      'Ping the destination IP address.
      Call IcmpSendEcho(hIcmp, lAddress, StringToSend, Len(StringToSend), 0, Reply, Len(Reply), lTimeOut)
  
      'Reply status
      ping = Reply.Status
      PingOutput = EvaluatePingResponse(ping)
      If ping = 0 Then
          Index = Index + 1
      Else
          MsgBox (PingOutput)
          Exit Do
      End If
      'Close the Icmp handle.
      'IcmpCloseHandle hIcmp
  Else
      Debug.Print "failure opening icmp handle."
      ping = -1
  End If
  Loop Until (Index &gt; 1000)
  'Close the Icmp handle.
  IcmpCloseHandle hIcmp
  
  Else
      ping = -1
  End If
  
  End Function
  </code></pre>