Link to home
Start Free TrialLog in
Avatar of Thomas Stockbruegger
Thomas StockbrueggerFlag for Germany

asked on

Need some help with my program MFC

Hello,
my SDI runs fine. When I close it I get a stop afxtls.cpp (see below)
What kind of error is this?
Please help.
500 poinst.
Best regards,
Thomas

afxtls.cpp
inline void* CThreadSlotData::GetThreadValue(int nSlot)
{
	EnterCriticalSection(&m_sect);
	ASSERT(nSlot != 0 && nSlot < m_nMax);
	ASSERT(m_pSlotData != NULL);
	ASSERT(m_pSlotData[nSlot].dwFlags & SLOT_USED);
	ASSERT(m_tlsIndex != (DWORD)-1);
	if( nSlot <= 0 || nSlot >= m_nMax ) // check for retail builds.
	{
		LeaveCriticalSection(&m_sect);
		return NULL;<---------------------------------------stops here
	}

Open in new window

Avatar of alb66
alb66
Flag of Italy image

Have you more then 1 thread?
Do you terminate all the thread correctly before exit the application?
Avatar of Thomas Stockbruegger

ASKER

Have you more then 1 thread? what does that mean?
Does your application create any worker thread?
I jused used button project clean
and project rebuild before I started with debug button.
(the button names could be different at your version)
Now the error is gone???
I don´t know why.
Does your application create any worker thread?What is a thread??? sorry
 
 
 
 
If you don't know what a thread is, you couldn't create one...    ;-)

For more informations give a look at
http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx
ASKER CERTIFIED SOLUTION
Avatar of itsmeandnobodyelse
itsmeandnobodyelse
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial