Writes a block of data to a file.
Note that StartingByteOffset in the request can be 64 bits. Requests made to NSS volumes support writing at true 64-bit offsets. Requests made to traditional volumes support writing at 32-bit offsets. Writing at offsets greater than 32 bits on a traditional volume result in an error.
If you do not have write access to the specified file or if some portion of the targeted byte block is locked for use by a different client, Write to a File will fail.
You are constrained by the current negotiated file buffer size (see Negotiate Buffer Size 0x2222 33). You cannot write more bytes of data than will fit in the buffer size. Also, you cannot write a data block that straddles a buffer size 4 KB boundary in the file.
For example, if the current buffer size were 4,096 bytes and you want to write 4,200 bytes, starting at file offset 4000, you must issue three write requests. The first request would write 96 bytes starting at offset 4000. The second request would write 4,096 bytes starting at offset 4,096. The last request would write 8 bytes starting at offset 8,192.
If you do not write any bytes at postion zero, the files will be truncated.
FileHandle, StartingByteOffset, and BytesToWrite require the input to be in Hi-Lo order.