Is WriteFile thread safe? I mean,can I write the same file from multiple threads simultaneously without synchronization? MSDN says nothing about thread safety of WriteFile.
Yes it is thread safe by its own, i.e it prevents system from crashing, win API maintain internal locking when writing files and that lock is byte-range locks. You can read more here
File locking