Click here to Skip to main content
15,896,726 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How many threads are there in a MFC application Pin
Naveen10-Dec-06 22:49
Naveen10-Dec-06 22:49 
AnswerRe: How many threads are there in a MFC application Pin
Sam Hobbs10-Dec-06 23:37
Sam Hobbs10-Dec-06 23:37 
AnswerRe: How many threads are there in a MFC application Pin
David Crow11-Dec-06 3:23
David Crow11-Dec-06 3:23 
QuestionCan FindFirstFile/FindNextFile be multithread? Pin
rgbalpha10-Dec-06 22:30
rgbalpha10-Dec-06 22:30 
AnswerRe: Can FindFirstFile/FindNextFile be multithread? Pin
Naveen10-Dec-06 22:41
Naveen10-Dec-06 22:41 
AnswerRe: Can FindFirstFile/FindNextFile be multithread? Pin
Waldermort10-Dec-06 22:55
Waldermort10-Dec-06 22:55 
AnswerRe: Can FindFirstFile/FindNextFile be multithread? Pin
Hamid_RT10-Dec-06 23:15
Hamid_RT10-Dec-06 23:15 
GeneralRe: Can FindFirstFile/FindNextFile be multithread? [modified] Pin
rgbalpha11-Dec-06 0:42
rgbalpha11-Dec-06 0:42 
Each time when the program find a file, it send it to the file_handler() to process. The file_handler() is a function in where I create another thread to process the file. It is like this:
void CMyDoc1::file_handler(LPCTSRT pFileName)<br />
{<br />
    m_fileName = pFileName;<br />
    AfxBeginThread(ThreadProc, this);<br />
}<br />
UINT ThreadProc(PVOID pParam)<br />
{<br />
    //processing the file...<br />
    CMyDoc1* pDoc = pParam;<br />
    pDoc ->FileProcessor();<br />
    return 0;<br />
}


The error occurs in FileProcessor(), when free the memory.



-- modified at 6:47 Monday 11th December, 2006
QuestionRe: Can FindFirstFile/FindNextFile be multithread? Pin
David Crow11-Dec-06 3:24
David Crow11-Dec-06 3:24 
AnswerRe: Can FindFirstFile/FindNextFile be multithread? Pin
rgbalpha11-Dec-06 17:03
rgbalpha11-Dec-06 17:03 
AnswerRe: Can FindFirstFile/FindNextFile be multithread? Pin
Sam Hobbs10-Dec-06 23:41
Sam Hobbs10-Dec-06 23:41 
AnswerRe: Can FindFirstFile/FindNextFile be multithread? Pin
James R. Twine11-Dec-06 4:08
James R. Twine11-Dec-06 4:08 
GeneralRe: Can FindFirstFile/FindNextFile be multithread? Pin
rgbalpha11-Dec-06 17:09
rgbalpha11-Dec-06 17:09 
Questionfatal error C1189 ?? Pin
Programm3r10-Dec-06 22:13
Programm3r10-Dec-06 22:13 
AnswerRe: fatal error C1189 ?? Pin
Naveen10-Dec-06 22:18
Naveen10-Dec-06 22:18 
GeneralRe: fatal error C1189 ?? Pin
Programm3r10-Dec-06 22:23
Programm3r10-Dec-06 22:23 
GeneralRe: fatal error C1189 ?? Pin
Naveen10-Dec-06 22:25
Naveen10-Dec-06 22:25 
GeneralRe: fatal error C1189 ?? Pin
Programm3r10-Dec-06 22:26
Programm3r10-Dec-06 22:26 
AnswerRe: fatal error C1189 ?? Pin
benjymous10-Dec-06 22:40
benjymous10-Dec-06 22:40 
QuestionDragable Menu Items Pin
benjamin2310-Dec-06 22:01
benjamin2310-Dec-06 22:01 
AnswerRe: Dragable Menu Items Pin
Naveen10-Dec-06 22:09
Naveen10-Dec-06 22:09 
AnswerRe: Dragable Menu Items Pin
benjamin2310-Dec-06 22:18
benjamin2310-Dec-06 22:18 
GeneralRe: Dragable Menu Items Pin
Naveen10-Dec-06 22:26
Naveen10-Dec-06 22:26 
AnswerRe: Dragable Menu Items Pin
Michael Dunn10-Dec-06 22:15
sitebuilderMichael Dunn10-Dec-06 22:15 
GeneralRe: Dragable Menu Items Pin
benjamin2310-Dec-06 22:22
benjamin2310-Dec-06 22:22 

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.