共享常量Sharing Constants

文件共享模式的常量。Constants for file-sharing modes.

语法Syntax


#include <share.h>  

备注Remarks

shflag 参数确定共享模式,其包括一个或多个清单常量。The shflag argument determines the sharing mode, which consists of one or more manifest constants. 这些常量可与 oflag 参数结合(请参阅文件常量)。These can be combined with the oflag arguments (see File Constants).

下表列出了常量及其含义:The following table lists the constants and their meanings:

返回的常量Constant 含义Meaning
_SH_DENYRW 拒绝对文件的读写访问权限Denies read and write access to file
_SH_DENYWR 拒绝对文件的写访问权限Denies write access to file
_SH_DENYRD 拒绝对文件的读访问权限Denies read access to file
_SH_DENYNO 允许读写访问权限Permits read and write access
_SH_SECURE 设置安全模式(共享读取、独占写入访问权限)。Sets secure mode (shared read, exclusive write access).

请参阅See Also

_sopen、_wsopen _sopen, _wsopen
_fsopen、_wfsopen _fsopen, _wfsopen
全局常量Global Constants