Click here to Skip to main content
       

C / C++ / MFC

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: C++: CreateProcess() launching child applications with UAC dialog for oncememberAndrew Cherednik26 Nov '12 - 12:21 
QuestionHow to use NTGraph3D Activex Control in Visual Studio 2010.memberDhrumilS23 Nov '12 - 0:48 
AnswerRe: How to use NTGraph3D Activex Control in Visual Studio 2010.mvpRichard MacCutchan23 Nov '12 - 1:43 
QuestionHow to get a ip address from system name [modified]memberD.Manivelan22 Nov '12 - 22:20 
AnswerRe: How to get a ip address from system namemembermsr_codeproject22 Nov '12 - 23:23 
AnswerRe: How to get a ip address from system namememberRolf Kristensen23 Nov '12 - 0:41 
QuestionHeap corruption problem after AfxBeginThread?memberbosfan22 Nov '12 - 21:14 
Hi,
i need some help to solve this problem after create of worker thread.
When i create a worker thread i receive this error message:
Windows has triggered a breakpoint in myprog.exe.
 
This may be due to a corruption of the heap, which indicates a bug in myprog.exe or any of the DLLs it has loaded.
This is the code snippet:
// create Thread:
CWinThread* cmythr= AfxBeginThread(controlfunc,params, THREAD_PRIORITY_HIGHEST, 0,CREATE_SUSPENDED,0);
if(NULL != cmythr)
{
	cmythr->ResumeThread();
}
but after maybe 10 seconds i receive this error message:
and the debugger show in this code in the file thrdcore.cpp:
// first -- check for simple worker thread
DWORD nResult = 0;
if (pThread->m_pfnThreadProc != NULL)
{
	nResult = (*pThread->m_pfnThreadProc)(pThread->m_pThreadParams);
	ASSERT_VALID(pThread);
}
 
A thing what make me confuse is that i cant find this position with memory allocation, i do nothing like this in this Function?
No parameter is NULL, what i'm doing wrong?
Any help is welcome
Thanks
bosfan
AnswerRe: Heap corruption problem after AfxBeginThread?membersirama200422 Nov '12 - 22:13 
AnswerRe: Heap corruption problem after AfxBeginThread?mvpRichard MacCutchan22 Nov '12 - 23:40 
GeneralRe: Heap corruption problem after AfxBeginThread?memberbosfan22 Nov '12 - 23:44 
AnswerRe: Heap corruption problem after AfxBeginThread?memberBilliousBob23 Nov '12 - 4:49 
AnswerRe: Heap corruption problem after AfxBeginThread?memberStephen Hewitt25 Nov '12 - 7:04 
QuestionWhat are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name?memberlucky_122122 Nov '12 - 0:41 
AnswerRe: What are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name?mvpRichard MacCutchan22 Nov '12 - 3:38 
QuestionChanging Dialog Button Color at runTimememberyogeshs20 Nov '12 - 23:07 
AnswerRe: Changing Dialog Button Color at runTimemembermanoranjan21 Nov '12 - 0:05 
GeneralRe: Changing Dialog Button Color at runTimememberyogeshs21 Nov '12 - 0:37 
GeneralRe: Changing Dialog Button Color at runTimemembermanoranjan21 Nov '12 - 1:12 
GeneralRe: Changing Dialog Button Color at runTimememberyogeshs21 Nov '12 - 18:56 
GeneralRe: Changing Dialog Button Color at runTimemembermanoranjan21 Nov '12 - 19:40 
QuestionPng Image button problem.groupyu-jian20 Nov '12 - 6:53 
QuestionMinimize CDialog Problemgroupyu-jian20 Nov '12 - 6:22 
AnswerRe: Minimize CDialog Problemmemberjeron120 Nov '12 - 6:31 
QuestionRe: Minimize CDialog ProblemmemberMaximilien20 Nov '12 - 8:26 
QuestionCheck if a character is lowercase and change to uppercase.memberMitchG92_2420 Nov '12 - 0:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 18 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid