CFile 共享违例,两个CFile如何同时读写
答案:2 悬赏:30 手机版
解决时间 2021-11-19 09:47
- 提问者网友:末路
- 2021-11-18 13:40
CFile 共享违例,两个CFile如何同时读写
最佳答案
- 五星知识达人网友:爱难随人意
- 2021-11-18 14:39
CFile file1("d:\\text.txt",CFile::modeWrite | CFile::shareDenyRead );
CFile file2("d:\\text.txt",CFile::modeRead | CFile::shareDenyRead );
补充:刚才写错了
CFile file1("d:\\text.txt",CFile::modeWrite | CFile::shareDenyWrite);
CFile file2("d:\\text.txt",CFile::modeRead | CFile::shareDenyRead );
CFile file2("d:\\text.txt",CFile::modeRead | CFile::shareDenyRead );
补充:刚才写错了
CFile file1("d:\\text.txt",CFile::modeWrite | CFile::shareDenyWrite);
CFile file2("d:\\text.txt",CFile::modeRead | CFile::shareDenyRead );
全部回答
- 1楼网友:春色三分
- 2021-11-18 14:45
CFile::shareDenyRead Opens the file and denies other processes read access to the file. Create fails if the file has been opened in compatibility mode or for read access by any other process.
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯