The EXIT_THREAD_DEBUG_INFO structure contains an exiting thread's exit code.
typedef struct _EXIT_THREAD_DEBUG_INFO { // etdi
DWORD dwExitCode;
} EXIT_THREAD_DEBUG_INFO;
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Debugging Overview, Debugging Structures, DEBUG_EVENT