Click here to Skip to main content
12,292,585 members (70,474 online)

C / C++ / MFC

 
QuestionHow to get a ip address from system name Pin
D.Manivelan22-Nov-12 22:20
memberD.Manivelan22-Nov-12 22:20 
AnswerRe: How to get a ip address from system name Pin
msr_codeproject22-Nov-12 23:23
membermsr_codeproject22-Nov-12 23:23 
AnswerRe: How to get a ip address from system name Pin
Rolf Kristensen23-Nov-12 0:41
memberRolf Kristensen23-Nov-12 0:41 
QuestionHeap corruption problem after AfxBeginThread? Pin
bosfan22-Nov-12 21:14
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? Pin
sirama200422-Nov-12 22:13
membersirama200422-Nov-12 22:13 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
Richard MacCutchan22-Nov-12 23:40
mvpRichard MacCutchan22-Nov-12 23:40 
GeneralRe: Heap corruption problem after AfxBeginThread? Pin
bosfan22-Nov-12 23:44
memberbosfan22-Nov-12 23:44 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
BilliousBob23-Nov-12 4:49
memberBilliousBob23-Nov-12 4:49 
AnswerRe: Heap corruption problem after AfxBeginThread? Pin
Stephen Hewitt25-Nov-12 7:04
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? Pin
lucky_122122-Nov-12 0:41
memberlucky_122122-Nov-12 0:41 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160518.1 | Last Updated 25 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid