"encountered a sharing violation while accessing" error message
권영 김
0
Reputation points
CStdioFile file;
if(!file.Open(strPath, CFile::modeCreate | CFile::modeNoTruncate | CFile::modeWrite, &exception))
{
CString msg;
static const int MSG_SIZE = 1024;
TCHAR* p = msg.GetBuffer(MSG_SIZE);
exception.GetErrorMessage(p, MSG_SIZE);
msg.ReleaseBuffer(-1);
AfxMessageBox(msg);
return;
}
=================================================================
Intermittent file creation error occurs
The result of checking the error message using the above code
"encountered a sharing violation while accessing" checked error message.
The file was never accessed while it was being created, and as mentioned, it happens intermittently.
Runs on Win10, implemented using VS2010
Please tell me how to solve this problem.
Developer technologies | C++
3,978 questions
Developer technologies | Visual Studio | Other
5,457 questions
Sign in to answer