Pastebin

Paste #440: exitstatus

< previous paste - next paste>

Pasted by Flawless

Download View as text

function TXThread.GetExitCode(var ExitCode: XResult): XResult; xcc;
var
  info: THREAD_BASIC_INFORMATION;
begin
  if NtWaitForSingleObject(FHandle, False, @ZeroWait) = STATUS_WAIT_0 then
  begin
    Result := CheckNTStatus(NtQueryInformationThread(FHandle, ThreadBasicInformation, @info, sizeof(info), nil));
    if Result < 0 then
      Exit;
    ExitCode := info.ExitStatus;
    Result := xsOk;
  end else
    Result := xeRunning;
end;

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.