Click here to Skip to main content
15,911,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VS6.0 Modeless Dialog as a static library or DLL Pin
Rajesh R Subramanian15-Oct-07 22:38
professionalRajesh R Subramanian15-Oct-07 22:38 
QuestionHow to wait for folder to finish copy Pin
icsr15-Oct-07 7:19
icsr15-Oct-07 7:19 
QuestionRe: How to wait for folder to finish copy Pin
David Crow15-Oct-07 8:01
David Crow15-Oct-07 8:01 
AnswerRe: How to wait for folder to finish copy Pin
icsr15-Oct-07 12:59
icsr15-Oct-07 12:59 
QuestionRe: How to wait for folder to finish copy Pin
David Crow16-Oct-07 2:20
David Crow16-Oct-07 2:20 
GeneralRe: How to wait for folder to finish copy Pin
icsr16-Oct-07 2:21
icsr16-Oct-07 2:21 
GeneralRe: How to wait for folder to finish copy Pin
David Crow16-Oct-07 3:11
David Crow16-Oct-07 3:11 
QuestionRe: How to wait for folder to finish copy Pin
icsr16-Oct-07 4:31
icsr16-Oct-07 4:31 
HANDLE cnh = FindFirstChangeNotification(inDirName, TRUE, <br />
		FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME|FILE_NOTIFY_CHANGE_SIZE|FILE_NOTIFY_CHANGE_LAST_WRITE);<br />
	if(cnh!= INVALID_HANDLE_VALUE)<br />
	{<br />
		DWORD dwMilSecs = 500; // time of wait<br />
		DWORD wr = WaitForSingleObject(cnh, dwMilSecs);//wait 500 ms<br />
<br />
		if(wr == WAIT_OBJECT_0)<br />
		{<br />
			<br />
			do {<br />
				FindNextChangeNotification(cnh);<br />
				wr = WaitForSingleObject(cnh, dwMilSecs);<br />
			} while(wr == WAIT_OBJECT_0);<br />
		}<br />
		FindCloseChangeNotification(cnh); <br />
	}<br />
<br />
	//copy files to the process directory<br />
	MoveFileEx (inDirName,outDirName,  MOVEFILE_WRITE_THROUGH | MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED); <br />
					<br />


Thank you David for your reply. This is what I have done. Since I only care about whether the directory changed or not, I used WaitForSingleObject. I think my program is not waiting long enough. I am also trying to understand what you have done in FaxWatch. I want to move only the directories that are done copying.

Thank you,
Indu
AnswerRe: How to wait for folder to finish copy Pin
David Crow16-Oct-07 4:45
David Crow16-Oct-07 4:45 
GeneralRe: How to wait for folder to finish copy Pin
icsr16-Oct-07 4:59
icsr16-Oct-07 4:59 
QuestionCreateProcess without Administrator Rights Pin
Michael Bergman15-Oct-07 7:01
Michael Bergman15-Oct-07 7:01 
AnswerRe: CreateProcess without Administrator Rights Pin
Xing Chen15-Oct-07 15:23
Xing Chen15-Oct-07 15:23 
QuestionPlain C Question Pin
#realJSOP15-Oct-07 5:42
professional#realJSOP15-Oct-07 5:42 
AnswerRe: Plain C Question Pin
Matthew Faithfull15-Oct-07 5:51
Matthew Faithfull15-Oct-07 5:51 
GeneralRe: Plain C Question Pin
#realJSOP15-Oct-07 5:58
professional#realJSOP15-Oct-07 5:58 
GeneralRe: Plain C Question Pin
Matthew Faithfull15-Oct-07 6:13
Matthew Faithfull15-Oct-07 6:13 
GeneralRe: Plain C Question Pin
#realJSOP15-Oct-07 7:13
professional#realJSOP15-Oct-07 7:13 
GeneralRe: Plain C Question Pin
Matthew Faithfull15-Oct-07 7:24
Matthew Faithfull15-Oct-07 7:24 
GeneralRe: Plain C Question Pin
led mike15-Oct-07 6:20
led mike15-Oct-07 6:20 
GeneralRe: Plain C Question Pin
#realJSOP15-Oct-07 6:36
professional#realJSOP15-Oct-07 6:36 
GeneralRe: Plain C Question Pin
led mike15-Oct-07 6:46
led mike15-Oct-07 6:46 
GeneralRe: Plain C Question Pin
#realJSOP15-Oct-07 7:11
professional#realJSOP15-Oct-07 7:11 
GeneralRe: Plain C Question Pin
led mike15-Oct-07 7:47
led mike15-Oct-07 7:47 
GeneralRe: Plain C Question Pin
#realJSOP15-Oct-07 8:42
professional#realJSOP15-Oct-07 8:42 
GeneralRe: Plain C Question Pin
led mike15-Oct-07 8:46
led mike15-Oct-07 8:46 

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.