[interprocess] file_lock permission denied

27 Nov
2009
27 Nov
'09
8:08 a.m.
Hi, I'm trying to use file_lock from interprocess but without success. Here is code I'm using: m_Stream.exceptions(std::ios::badbit); m_Stream.open(m_FileName.c_str()); boost::interprocess::file_lock lock(m_FileName.c_str()); ... { // Lock file boost::interprocess::scoped_lockboost::interprocess::file_lock scoped_file_lock(lock); // Write to stream m_Stream << "Some text"; m_Stream.flush(); } where m_Stream is std::ofstream. When "m_Stream.flush()" is executed, I've got a "badbit" exception with "errno" 0x001b0800 and message (with strerror()) "Permission denied". I've tried also with win32 CreateFile()/WriteFile() but without success. I'm using boost 1.40, Visual Studio 2005 SP1, Vista 32 bit SP2 Thanks Trigve
5566
Age (days ago)
5566
Last active (days ago)
0 comments
1 participants
participants (1)
-
Trigve Siver