Visual C++ 6.0, WinNT
I have a thread that inherits from CWinThread.  I start it like this:

// pMyThread is a static class member of type CMyThread*
pMyThread = static_cast<CMyThread*>(AfxBeginThread(RUNTIME_CLASS(CMyThread),
THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);

pMyThread->SetDlgPtr(this); // saving a pointer to another dialog

pMyThread->ResumeThread();

///////////////

The thread starts, and goes through its InitInstance() function.  Then it immediately 
goes to ExitInstance() and its destructor.  I can't figure out why it immediately goes 
to ExitInstance() and quits, instead of running.  The call stack when it enters 
ExitInstance() is:

CMyThread::ExitInstance() line 55
MFC42D! 5f438606()
MSVCRTD! 1020bf53()
KERNEL32! 77f04ef0()

/////////
I tried putting a breakpoint in CMyThread::Run() to see what was going on, and Visual 
C++ tells me that it was unable to put a breakpoint there.  So it never gets to the 
Run() function. I don't understand what's going on, help!


Jean Palmer
Northrop Grumman
> * [EMAIL PROTECTED]
> * (410-993-2627)
> 
> 

_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription 
changes, and list archive.

Reply via email to