Click here to Skip to main content
15,904,346 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeThe monkeys do it! Pin
Rajesh R Subramanian11-Jun-09 2:12
professionalRajesh R Subramanian11-Jun-09 2:12 
GeneralRe: module name Pin
ali kanju11-Jun-09 1:45
ali kanju11-Jun-09 1:45 
AnswerRe: module name Pin
Hamid_RT11-Jun-09 1:40
Hamid_RT11-Jun-09 1:40 
AnswerRe: module name Pin
CPallini11-Jun-09 1:41
mveCPallini11-Jun-09 1:41 
GeneralRe: module name Pin
ali kanju11-Jun-09 1:52
ali kanju11-Jun-09 1:52 
GeneralRe: module name Pin
CPallini11-Jun-09 2:04
mveCPallini11-Jun-09 2:04 
GeneralRe: module name Pin
ali kanju11-Jun-09 2:12
ali kanju11-Jun-09 2:12 
QuestionEvent sink for event raised by managed code component. Pin
Keith Sheppard11-Jun-09 0:51
Keith Sheppard11-Jun-09 0:51 
AnswerRe: Event sink for event raised by managed code component. Pin
Keith Sheppard11-Jun-09 1:57
Keith Sheppard11-Jun-09 1:57 
QuestionHIde a Process in Task manager Pin
tns_ranjith11-Jun-09 0:19
tns_ranjith11-Jun-09 0:19 
AnswerRe: HIde a Process in Task manager PinPopular
Rajesh R Subramanian11-Jun-09 0:21
professionalRajesh R Subramanian11-Jun-09 0:21 
GeneralRe: HIde a Process in Task manager Pin
tns_ranjith11-Jun-09 1:14
tns_ranjith11-Jun-09 1:14 
GeneralRe: HIde a Process in Task manager Pin
tns_ranjith11-Jun-09 1:14
tns_ranjith11-Jun-09 1:14 
GeneralRe: HIde a Process in Task manager Pin
Rajesh R Subramanian11-Jun-09 1:19
professionalRajesh R Subramanian11-Jun-09 1:19 
GeneralRe: HIde a Process in Task manager Pin
Cedric Moonen11-Jun-09 1:22
Cedric Moonen11-Jun-09 1:22 
AnswerRe: HIde a Process in Task manager Pin
Garth J Lancaster11-Jun-09 0:22
professionalGarth J Lancaster11-Jun-09 0:22 
GeneralRe: HIde a Process in Task manager Pin
tns_ranjith11-Jun-09 1:16
tns_ranjith11-Jun-09 1:16 
GeneralRe: HIde a Process in Task manager Pin
Garth J Lancaster11-Jun-09 1:24
professionalGarth J Lancaster11-Jun-09 1:24 
GeneralRe: HIde a Process in Task manager Pin
Chandrasekharan P11-Jun-09 2:03
Chandrasekharan P11-Jun-09 2:03 
GeneralRe: HIde a Process in Task manager Pin
Michael Schubert11-Jun-09 2:17
Michael Schubert11-Jun-09 2:17 
GeneralRe: HIde a Process in Task manager Pin
Garth J Lancaster11-Jun-09 11:44
professionalGarth J Lancaster11-Jun-09 11:44 
GeneralRe: HIde a Process in Task manager Pin
CPallini11-Jun-09 2:00
mveCPallini11-Jun-09 2:00 
QuestionDebug Assertion Failed Pin
Davitor10-Jun-09 23:52
Davitor10-Jun-09 23:52 
AnswerRe: Debug Assertion Failed Pin
Cedric Moonen11-Jun-09 0:14
Cedric Moonen11-Jun-09 0:14 
GeneralRe: Debug Assertion Failed Pin
Davitor11-Jun-09 0:33
Davitor11-Jun-09 0:33 
Thanks for reply.

i use debugger but i havn't found that time exception.

void CDelayedDirectoryChangeHandler::On_FileAdded(const CString & strFileName)
{
CStringArray szaddcopyFiles;
CString strFileName;
CString path="D:\\DVD";
szaddcopyFiles.Add(strFileName);
	
				

int numofcopyitems = szaddcopyFiles.GetSize();
if (numofcopyitems > 0)
{
	tr=1;
for(;aq<numofcopyitems;)
{
	finalString=szaddcopyFiles.GetAt(i);




	 strFileName1=finalString;
	 for(int idc=0;idc<5;idc++)
	 {
		AfxBeginThread(WorkerThreadProc1,NULL,THREAD_PRIORITY_NORMAL,0,0,NULL);
   		WaitForSingleObject(WorkerThreadProc1, INFINITE);
	 }




}
}


		if(tr==1)
		{
			
			szaddcopyFiles.RemoveAll();
			tr=0;
		}
}

UINT WorkerThreadProc(LPVOID Param)
{
	CFileOperation fo;
	CString tr=finalString;
			
     


   		
		int nLen = tr.GetLength();
		
		LPCSTR lpszBuf = tr.GetBufferSetLength(nLen);
    	tr.ReleaseBuffer(nLen);
		LPCSTR pF=lpszBuf;
		
		
			CStdioFile file;
			fo.SetOverwriteMode(TRUE);
			if(fo.Copy(pF,pT));
			

			//int nPos1121 = finalString.ReverseFind('\\');
			int nPos2121 = finalString.ReverseFind('.');

if( nPos2121 > -1)
{
				if (file.Open(_T(finalString),  CFile::modeRead | CFile::modeNoTruncate))
				{
					
					ULONGLONG dwFileSize;
					dwFileSize = GetFileSize(file,  NULL);
					float fVar;
					str1.Format(_T("%I64u"), dwFileSize);
					file.Close();
				}
			

	
		AfxBeginThread(WorkerThreadProccd,NULL,THREAD_PRIORITY_NORMAL,0,0,NULL);
   		WaitForSingleObject(WorkerThreadProccd, INFINITE);
		 
	
		
		
	
	
}	
   return TRUE;
}
UINT WorkerThreadProccd(LPVOID Param)
{
	CFileOperation fo;
	CString tr1=finalString;
	int nLen1 = tr1.GetLength();
	//LPCSTR lpszBuf1 = tr1.GetBuffer(nLen1);
	LPCSTR lpszBuf1 = tr1.GetBufferSetLength(nLen1);
    tr1.ReleaseBuffer(nLen1);
	LPCSTR pF1=lpszBuf1;
		
		
		if(fo.Copy(pF1,pT));
	return TRUE;
}

Now i hope you will help me..

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.