Opens a file for sharing. These are versions of _sopen and _wsopen with security enhancements as described inSecurity Enhancements in the CRT.
errno_t _sopen_s(
int* pfh,
const char *filename,
int oflag,
int shflag,
int pmode
);
errno_t _wsopen_s(
int* pfh,
const wchar_t *filename,
int oflag,
int shflag,
int pmode,
);
[out]
pfh
The file handle, or -1 in the case of an error.
[in]
filename
File name.
[in]
oflag
Type of operations allowed.
[in]
shflag
Type of sharing allowed.
[in]
pmode
Permission setting.
Reads data from a file.
int _read(
intfd,
void *buffer,
unsigned intcount);