10-05-2011 04:03 PM
I am working on a piece of test equipment which contains an embedded PC running LabWindows/CVI program. The program opens and reads in files stored on the harddrive of the embedded PC and sends the data, via Ethernet, to other boards within the unit using calls to ClientTCPWrite(). When I send small chunks of data (up to 4096 bytes) it works fine.
When I try to send a huge chunk of data I get a -8 back from ClientTCPWrite(). Calls to GetTCPErrorString() and GetTCPSystemErrorString() result in "Write Failed" and "WSAENOBUFS: No buffer space available" respectively.
The help says that as long as the number of bytes you are trying to write is less than UINT_MAX. Searching library include files it looks as if UINT_MAX is 0xffffffff. I am limiting my writes to 0x7fffffff.
What is this error message telling me and what do I need to do to avoid getting it?
Thank you so much for any assistance you can provide.
Gwen Belt
10-05-2011 04:53 PM
I have also seen this when communicating with devices that do not have that much memory. To my experience, limiting the amount of data sent at once reliably solves this issue - as you said.
BTW: Have you read this at MS?
Regards, Guenter
10-05-2011 04:56 PM
Thank you Guenter. I appreciate your speedy response.