NT-Network - cannot write to files which are in use

When writing to a file which is opened by some users (not
exclusive) the write buffer is not transfered correctly.
The file is not changed - sometimes the buffer is written to a wrong
position.

For writing I use the code:
"filemode:=$42;  reset(F,1);  seek(f,position);
blockwrite(f,buf,bufsize); close(f);"

For reading I use the code:
"filemode:=$42 (or $40);  reset(F,1);  seek(f,position);
blockread(f,buf,bufsize); close(f);"

Reading and writing at the same time does not work. The program can
read but when writing the file is not changed.
All the functions above return IOResult=0, but that must be wrong.

Volker