The shflag argument determines the sharing mode, which consists of one or more manifest constants. These can be combined with the oflag arguments (see File Constants).
The constants and their meanings are listed below:
Sets compatibility mode
Denies read and write access to file
Denies write access to file
Denies read access to file
Permits read and write access
Sets secure mode (shared read, exclusive write access).