title: labwindows: What argument does ServerTCPRead exactly need?
body: <p>The Labwindows documentation says the following about the ServerTCPRead Method:</p>
  
  <pre><code>int ServerTCPRead (unsigned int conversationHandle, void *dataBuffer, size_t dataSize, unsigned int timeOut);
  </code></pre>
  
  <p>dataBuffer void * The pointer to the buffer in which to store the data. </p>
  
  <p>However, when I actually declare a pointer and pass it to the method, it returns with the following error:</p>
  
  <blockquote>
    <p>FATAL RUN-TIME ERROR:   "test1.c", line 146, col 61, thread id 0x00001474:   Array argument too small (1 bytes).  Argument must contain at least 60000 bytes (60000 elements).</p>
  </blockquote>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>char * receiveBuf="";
      ssize_t dataSize = 60000;
  
      switch (event)
          {
          case TCP_CONNECT:
  
              break;
          case TCP_DATAREADY:
              if ((dataSize = ServerTCPRead (g_hconversation, receiveBuf,
                                             dataSize, 1000))
                  &lt; 0)
                  {
                  //SetCtrlVal (g_hmainPanel, MAINPNL_RECEIVE, "Receive Error\n");
  
                  }
              else
                  {
              display_value_from_client(receiveBuf);
  
                  }                                            
              break;
  </code></pre>