CWinThread::ExitInstance

Called by the framework from within a rarely overridden Run member function to exit this instance of the thread, or if a call to InitInstance fails.

virtual int ExitInstance( );

Return Value

The thread's exit code; 0 indicates no errors, and values greater than 0 indicate an error. This value can be retrieved by calling GetExitCodeThread.

Remarks

Do not call this member function from anywhere but within the Run member function. This member function is used only in user-interface threads.

The default implementation of this function deletes the CWinThread object if m_bAutoDelete is TRUE. Override this function if you wish to perform additional clean-up when your thread terminates. Your implementation of ExitInstance should call the base class's version after your code is executed.

Requirements

Header: afxwin.h

See Also

Reference

CWinThread Class

Hierarchy Chart

CWinApp::ExitInstance

Other Resources

CWinThread Members