Hello friends,,I am creating a file in which I will have some details in it...I dont any body to edit it..so I decided to keep that as read only file...I tried the following code but its popping an exception when I am setting the status...Please tel me if there are any alternative
CFile test(L"C:\\Desktop\\myText.txt",CFile::modeCreate|CFile::modeWrite);
CFileStatus status;
test.GetStatus(status);
status.m_attribute = CFile::readonly;
test.SetStatus(L"C:\\Desktop\\myText.txt",status);