the file for writing (or reading and writing) while it is already open with this
deny-mode, the attempt will fail.
•Deny-none dwShareMode = FILE_SHARE_WRITE |
FILE_SHARE_READ The application is requesting that no other
applications/users be denied any access to the file while it holds the file open.
Specifying this mode allows other applications to open the file and read or
write to it while it is already being held open by the calling application. The
combination of the access mode and deny mode used by a Windows
application when opening a file constitutes a request for a file lock. File locks
can be seen "in action" in many popular Windows applications.
The figure shows how Microsoft Word uses file locking to control concurrent
access to document files that are located on a network server.