When I used ACE_OS::fopen function to create file for writing, the result was failed and got errno message "No such device or address". Windows OS: windows server 2008 r2 enterprise! It made me confused, what kinds of reasons could cause this problem!
Asked
Active
Viewed 736 times
1 Answers
0
You are not posting any code, so we can't tell for sure, but there could be multiple reasons: 1. The file is not there 2. You specify the path not correctly 3. You do not have permission to read the file

Johnny Willemsen
- 2,942
- 1
- 14
- 16
-
if(NULL == this->fp_) { FILE* fp = ACE_OS::fopen(this->fileName_.c_str(), "a+b"); if(NULL == fp) { LOGERR("Open file[%s] for writting failed, system errmsg[%s]", this->fileName_.c_str(), strerror(errno)); return NULL; } this->fp_ = fp; } – user1663084 Mar 21 '14 at 05:58
-
that's piece of my code! Just so simple! It made depressed! – user1663084 Mar 21 '14 at 06:01
-
And what is the value of fileName_, what are the exact security settings of that file on disk? – Johnny Willemsen Mar 21 '14 at 12:20
-
the value of fileName_ is the file path to be created! Thank you for your kindness! – user1663084 Mar 26 '14 at 10:18
-
It will only create the file, not the full path as far as I know – Johnny Willemsen Mar 27 '14 at 13:41