Click here to Skip to main content
15,916,846 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHandling Cdialog's in a App. Pin
Donguy197612-Apr-13 16:50
Donguy197612-Apr-13 16:50 
AnswerRe: Handling Cdialog's in a App. Pin
Richard MacCutchan12-Apr-13 22:07
mveRichard MacCutchan12-Apr-13 22:07 
SuggestionRe: Handling Cdialog's in a App. Pin
David Crow13-Apr-13 15:30
David Crow13-Apr-13 15:30 
GeneralRe: Handling Cdialog's in a App. Pin
H.Brydon15-Apr-13 18:02
professionalH.Brydon15-Apr-13 18:02 
QuestionOutlook MSG files Pin
Joe Woodbury12-Apr-13 7:26
professionalJoe Woodbury12-Apr-13 7:26 
QuestionRe: Outlook MSG files Pin
David Crow13-Apr-13 15:32
David Crow13-Apr-13 15:32 
AnswerRe: Outlook MSG files Pin
Joe Woodbury13-Apr-13 15:56
professionalJoe Woodbury13-Apr-13 15:56 
QuestionDetecting when a file copy is complete Pin
Charles Blessing12-Apr-13 5:17
Charles Blessing12-Apr-13 5:17 
Hi,

I have an application that performs some processing on files dropped into a 'watch folder'. The problem I'm having is detecting when the file copy to the folder is complete.

The application needs to run on both Windows and OSX, so ideally I'd like a cross-platform solution, although there is no reason (other than future maintainability) for using the same algorithm on both platforms.

The way I'm doing this at the moment is to wait until I can get a read lock on the file (by just trying to open it), then periodically checking the size of the file to make sure it's not getting any bigger.

Once both of those criteria have been met, I process the file.

The problem I'm seeing is that once in a blue moon, the two criteria will be met when the file is still being copied. My gut feeling is that it's caused by momentary network congestion, but I've been unable to reproduce the issue whilst debugging.

I can probably make it more stable by just throwing a few more checks at the problem and tweaking the time-out values, but the software engineer in me would like a more definitive solution.

Does anyone have any suggestions?

Cheers,
Charles
Charles Blessing
Software Engineer
NUGEN Audio

QuestionRe: Detecting when a file copy is complete Pin
David Crow12-Apr-13 5:22
David Crow12-Apr-13 5:22 
AnswerRe: Detecting when a file copy is complete Pin
Joe Woodbury12-Apr-13 8:08
professionalJoe Woodbury12-Apr-13 8:08 
GeneralRe: Detecting when a file copy is complete Pin
H.Brydon12-Apr-13 11:39
professionalH.Brydon12-Apr-13 11:39 
QuestionGet all window hadles Pin
Donguy197612-Apr-13 5:06
Donguy197612-Apr-13 5:06 
SuggestionRe: Get all window hadles Pin
David Crow12-Apr-13 5:17
David Crow12-Apr-13 5:17 
GeneralRe: Get all window hadles Pin
Donguy197612-Apr-13 10:22
Donguy197612-Apr-13 10:22 
GeneralRe: Get all window hadles Pin
ITboy_Lemon13-Apr-13 5:59
professionalITboy_Lemon13-Apr-13 5:59 
QuestionIs it a good practice to use continue Pin
Argonia12-Apr-13 0:27
professionalArgonia12-Apr-13 0:27 
AnswerRe: Is it a good practice to use continue Pin
Erudite_Eric12-Apr-13 0:49
Erudite_Eric12-Apr-13 0:49 
AnswerRe: Is it a good practice to use continue Pin
pasztorpisti12-Apr-13 2:04
pasztorpisti12-Apr-13 2:04 
GeneralRe: Is it a good practice to use continue Pin
Erudite_Eric12-Apr-13 2:42
Erudite_Eric12-Apr-13 2:42 
GeneralRe: Is it a good practice to use continue Pin
pasztorpisti12-Apr-13 6:05
pasztorpisti12-Apr-13 6:05 
GeneralRe: Is it a good practice to use continue Pin
Erudite_Eric16-Apr-13 4:56
Erudite_Eric16-Apr-13 4:56 
GeneralRe: Is it a good practice to use continue Pin
Stefan_Lang18-Apr-13 20:50
Stefan_Lang18-Apr-13 20:50 
AnswerRe: Is it a good practice to use continue Pin
CPallini12-Apr-13 3:15
mveCPallini12-Apr-13 3:15 
GeneralRe: Is it a good practice to use continue Pin
Erudite_Eric12-Apr-13 3:21
Erudite_Eric12-Apr-13 3:21 
QuestionRe: Is it a good practice to use continue Pin
CPallini12-Apr-13 3:26
mveCPallini12-Apr-13 3:26 

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.