我用CStdioFile打开文件,有什么办法使我还没有关闭文件的时候,另外一个地方又可以打开这个文件
我用CStdioFile打开文件,有什么办法使我还没有关闭文件的时候,另外一个地方又可以打开这个文件
各位高手请帮忙.
[解决办法]
打开的文件的时候增加 共享读写选项
CFile::shareDenyNone
[解决办法]
CStdioFile qReadFile(FileName, CFile::modeRead|CFile::shareDenyNone);
[解决办法]
上面已经给出答案 我就不落锁了
[解决办法]
来迟了
支持一楼
[解决办法]
CFile::shareDenyNone Opens the file without denying other processes read or write access to the file. Create fails if the file has been opened in compatibility mode by any other process.