Quantcast
Channel: Create a read-only file in C++ - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Michael Haephrati for Create a read-only file in C++

$
0
0

I would use the following code:

HANDLE  hFile = CreateFile(L"read_only_file.txt", GENERIC_ALL, 0, NULL, FILE_SHARE_WRITE, FILE_ATTRIBUTE_READONLY, NULL);

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles



Latest Images