Sharing Constants

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

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:

ConstantMeaning
_SH_DENYRWDenies read and write access to file
_SH_DENYWRDenies write access to file
_SH_DENYRDDenies read access to file
_SH_DENYNOPermits read and write access
_SH_SECURESets secure mode (shared read, exclusive write access).

_sopen, _wsopen
_fsopen, _wfsopen
Global Constants

Show: