if you want to exit thread ,using an event
in the thread's ExitInstance, and waiting for it in the control app.
Here's some documentation on getting the exit code .
Retrieving the Exit Code of a Thread
To get the exit code of either the worker or the user-interface
thread, call the ::GetExitCodeThread function. For information about
this function, see the Win32 Programmer's Reference, Volume 3. This
function takes the handle to the thread (stored in the m_hThread data
member of CWinThread objects) and the address of a DWORD.
If the thread is still active, ::GetExitCodeThread will place
STILL_ACTIVE in the supplied DWORD address; otherwise, the exit code
is placed in this address.
Retrieving the exit code of CWinThread objects takes an extra step. By
default, when a CWinThread thread terminates, the thread object is
deleted. This means you cannot access the m_hThread data member
because the CWinThread object no longer exists. To avoid this
situation, do one of the following two things:
Set the m_bAutoDelete data member to FALSE. This allows the CWinThread
object to survive after the thread has been terminated. You can then
access the m_hThread data member after the thread has been terminated.
If you use this technique, however, you are responsible for destroying
the CWinThread object as the framework will not automatically delete
it for you. This is the preferred method.
eclipse的maven项目中，在run as 执行maven命令的时候发现毫无反应，console也不打印信息，原因是因为没有传maven环境的参数，解决办法如下：①打开eclipse的window菜单：操作步骤如图标1、2、3。在标红色框3中添加如图所示的一行代码，代码如下：-Dmaven.multiModuleProjectDirectory=$MAVEN_HOME※这里的$MAVEN_...