Click here to Skip to main content
15,901,283 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accessing to parent view Pin
GDavy19-May-05 21:12
GDavy19-May-05 21:12 
GeneralRe: Accessing to parent view Pin
doctorpi19-May-05 22:26
doctorpi19-May-05 22:26 
GeneralRe: Accessing to parent view Pin
GDavy19-May-05 22:29
GDavy19-May-05 22:29 
GeneralRe: Accessing to parent view Pin
Tom Archer20-May-05 17:08
Tom Archer20-May-05 17:08 
GeneralC++ Client for Microsoft Excel Pin
AnuradhaCpp19-May-05 20:11
AnuradhaCpp19-May-05 20:11 
GeneralRe: C++ Client for Microsoft Excel Pin
David Crow20-May-05 2:04
David Crow20-May-05 2:04 
QuestionHow to show the Application's icon in the Local disk Pin
wwwht19-May-05 20:06
wwwht19-May-05 20:06 
GeneralCFile::UnlockRange () exception problem Pin
NeoHobbit19-May-05 19:44
NeoHobbit19-May-05 19:44 
Hi.

A piece of software I have been working on relies on the locking and unlocking of 1 byte inside a specified file, from within a thread that is controlled via mutexes.

The problem I am having is intermittent. Occasionally while the following code is called:
TRY
{
 m_File.Flush ();
 m_File.UnlockRange ( LOCK_BYTE, 1); // This is the problem line
}
CATCH (CFileException, e)
{
 e->ReportError ();
 e->Delete ();
}
END_CATCH


An exception is returned and the exception puts up on the screen "An unknown error occured while accessing an unnamed file" and in the output window "CFile exception: generic, File Unknown, OS error information = 158".

Looking at the values in the CFile object, everything looks fine. Valid handle and valid values in the variables.

Just wondering if anyone has some clue on where to look, what to look for, or even how to fix. Any ideas are welcomed as deadline is fast approaching.
GeneralCommunication Pin
usmanmir19-May-05 18:43
usmanmir19-May-05 18:43 
GeneralRe: Communication Pin
Christian Graus19-May-05 18:49
protectorChristian Graus19-May-05 18:49 
GeneralRe: Communication Pin
ThatsAlok19-May-05 19:01
ThatsAlok19-May-05 19:01 
GeneralRe: Communication Pin
Michael Dunn19-May-05 19:58
sitebuilderMichael Dunn19-May-05 19:58 
GeneralRe: Communication Pin
ThatsAlok19-May-05 20:03
ThatsAlok19-May-05 20:03 
GeneralRe: Communication Pin
usmanmir19-May-05 19:02
usmanmir19-May-05 19:02 
GeneralRe: Communication Pin
Christian Graus19-May-05 19:05
protectorChristian Graus19-May-05 19:05 
GeneralRe: Communication Pin
usmanmir19-May-05 19:14
usmanmir19-May-05 19:14 
GeneralRe: Communication Pin
Christian Graus19-May-05 19:19
protectorChristian Graus19-May-05 19:19 
GeneralRe: Communication Pin
RChin20-May-05 1:09
RChin20-May-05 1:09 
GeneralRe: Communication Pin
CodeBeetle26-May-05 7:24
CodeBeetle26-May-05 7:24 
QuestionHow to refresh Explorer window after Registry key changed? Pin
EastDragon19-May-05 17:19
EastDragon19-May-05 17:19 
AnswerRe: How to refresh Explorer window after Registry key changed? Pin
Michael Dunn19-May-05 20:02
sitebuilderMichael Dunn19-May-05 20:02 
GeneralVisual C++ 6.0 Editor Paste Problem Pin
gjr19-May-05 16:42
gjr19-May-05 16:42 
GeneralRe: Visual C++ 6.0 Editor Paste Problem Pin
Tom Archer20-May-05 17:09
Tom Archer20-May-05 17:09 
GeneralRe: Visual C++ 6.0 Editor Paste Problem Pin
gjr20-May-05 19:03
gjr20-May-05 19:03 
GeneralListCtrl in a view Pin
merkit19-May-05 16:28
merkit19-May-05 16:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.