I think you are saying... No mater what size the data you are sending, send it with one WriteFile call, right?
So not this:
For i 1 to 10
WriteFile (BYVAL HandleWriteFile, WRITE_BUFFER, 1024, BYTES_WRITTEN)
next
Do this?
WriteFile (BYVAL HandleWriteFile, WRITE_BUFFER, 10,240, BYTES_WRITTEN)
I will give that a try.