CFile::Write not working properly on a network drive unless I add one to the number of bytes.
Posted on 2003-04-01
I am having a problem writing out to a file on a network drive. When I call the CFile Write function, the computer hangs for about a minute, then eventally displays an error message that access to the file is denied. I have write access to the network drive. This problem only happens when using the network drive. It works fine when writing to a local drive. The command I use is:
But the funny thing is, if I add one to the number of bytes being sent, such as:
then it works fine. Does anybody know why this is? Has anyone else ever experienced anything like this?
c is a character string. I have allowed enough space for the string. I can't find anywhere where I don't allow enough memory.