Sharing Constants

Sharing Constants

Constants for file-sharing modes.

#include <share.h>

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 following table lists the constants and their meanings:




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).

© 2015 Microsoft