Click here to Skip to main content
15,886,788 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFile::Remove fails Pin
jeron120-May-10 6:48
jeron120-May-10 6:48 
GeneralRe: CFile::Remove fails Pin
Mike Osbahr20-May-10 7:12
Mike Osbahr20-May-10 7:12 
QuestionRe: CFile::Remove fails Pin
David Crow20-May-10 6:56
David Crow20-May-10 6:56 
AnswerRe: CFile::Remove fails Pin
Mike Osbahr20-May-10 7:20
Mike Osbahr20-May-10 7:20 
QuestionRe: CFile::Remove fails Pin
David Crow20-May-10 7:37
David Crow20-May-10 7:37 
AnswerRe: CFile::Remove fails Pin
Mike Osbahr20-May-10 7:58
Mike Osbahr20-May-10 7:58 
QuestionRe: CFile::Remove fails Pin
David Crow20-May-10 6:18
David Crow20-May-10 6:18 
AnswerRe: CFile::Remove fails Pin
Luc Pattyn20-May-10 9:18
sitebuilderLuc Pattyn20-May-10 9:18 
Here is an hypothesis. It may seem far fetched, it has been proven correct many times already.

A file gets created. By your app or another one, not really relevant.
Pretty soon (very relevant) your app wants to read that file, no problem; wants to modify or delete that file, big problem.
What happens is this: something is also interested in your fresh file, opens it with read intentions, but doing so also locks it for writing and deleting.
Who does this? Any piece of code that wants to help you: an anti-virus package; an automatic indexer; Google Desktop; you name it.

Remedy 1: wait 1 minute. Literally. Let the helpers do their work, then remove the file.
Remedy 2: use a special folder, and put it on the exceptions list of the helper, if you can identify it.

Why the sudden change? did you add such helper? did one of them become slower? did the load of your system increase recently, making everything run a bit slower?

FYI: Windows Explorer is well aware of this phenomenon; if you give it a delete command, which fails, it will not tell you immediately; instead it will retry 5 times at 1 second intervals, and only if that still fails, it will tell you so. (And you can find a patch to modify that "5" in the registry, Google will provide the details).

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

GeneralRe: CFile::Remove fails Pin
Mike Osbahr25-May-10 4:54
Mike Osbahr25-May-10 4:54 
QuestionIn-place "conversion" of a string literal into a named object Pin
Code-o-mat20-May-10 4:07
Code-o-mat20-May-10 4:07 
QuestionRe: In-place "conversion" of a string literal into a named object Pin
CPallini20-May-10 11:41
mveCPallini20-May-10 11:41 
AnswerRe: In-place "conversion" of a string literal into a named object Pin
Stephen Hewitt20-May-10 14:13
Stephen Hewitt20-May-10 14:13 
AnswerRe: In-place "conversion" of a string literal into a named object Pin
Code-o-mat20-May-10 21:56
Code-o-mat20-May-10 21:56 
QuestionCalling a function directly via VTable. Pin
Green Fuze20-May-10 3:32
Green Fuze20-May-10 3:32 
AnswerRe: Calling a function directly via VTable. Pin
Aescleal20-May-10 3:45
Aescleal20-May-10 3:45 
GeneralRe: Calling a function directly via VTable. Pin
Chris Meech20-May-10 4:19
Chris Meech20-May-10 4:19 
GeneralRe: Calling a function directly via VTable. Pin
Green Fuze20-May-10 6:09
Green Fuze20-May-10 6:09 
GeneralRe: Calling a function directly via VTable. Pin
Aescleal20-May-10 12:32
Aescleal20-May-10 12:32 
QuestionCreate a custom Setup tool to instal other setup programs. (hooking involved.) Pin
Natural_Demon20-May-10 3:24
Natural_Demon20-May-10 3:24 
QuestionCListCtrl Pin
Sakhalean20-May-10 2:52
Sakhalean20-May-10 2:52 
AnswerRe: CListCtrl Pin
CPallini20-May-10 3:02
mveCPallini20-May-10 3:02 
GeneralRe: CListCtrl Pin
Sakhalean20-May-10 3:38
Sakhalean20-May-10 3:38 
GeneralRe: CListCtrl Pin
josda100020-May-10 9:29
josda100020-May-10 9:29 
GeneralRe: CListCtrl Pin
Sakhalean21-May-10 2:41
Sakhalean21-May-10 2:41 
GeneralRe: CListCtrl Pin
josda100021-May-10 3:36
josda100021-May-10 3:36 

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.