@msdn=https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodethread @pinvoke=http://pinvoke.net/$$$.htm Summary: Retrieves the termination status of the specified thread. !!!!C# Signature: // uint output [DllImport("kernel32.dll", SetLastError=true)] static extern bool GetExitCodeThread(IntPtr hThread, out uint lpExitCode); // IntPtr output [DllImport("kernel32.dll", SetLastError=true)] static extern bool GetExitCodeThread(IntPtr hThread, IntPtr lpExitCode); !!!!VB Signature: ' UInteger output Declare Function GetExitCodeThread Lib "kernel32.dll" (ByVal hThread As IntPtr, ByRef lpExitCode As UInteger) As Boolean ' IntPtr output Declare Function GetExitCodeThread Lib "kernel32.dll" (ByVal hThread As IntPtr, ByVal lpExitCode As IntPtr) As Boolean !!!!User-Defined Types: None. !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: If the specified thread is still running then the lpExitCode will be set to STILL_ACTIVE / STATUS_PENDING (0x103) !!!!Tips & Tricks: Please add some! !!!!Sample Code: uint dwOut = 0; while (GetExitCodeThread(hThread, out dwOut)) { if (dwOut != 0x103) break; Thread.Sleep(10); // Don't cook our CPU } Console.WriteLine("Thread exit code: {0}", dwOut); Documentation: GetExitCodeThread@msdn on MSDN
Edit kernel32.GetExitC...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.