Skip to content

source/TargetB.pas is an invalid unit, likely should be dropped #44

@darianmiller

Description

@darianmiller

Inside the unit is unit AdFaxCtl; so it's mismatched.

It also has invalid code

destructor TApdFaxDriverInterface.Destroy;
begin
  fFileName := '';
  fDocName := '';
  if not (csDesigning in ComponentState) then begin
    if IsWinNT then
      with MonitorThread do begin
        Terminate(); //!! Issue 1183814

          SetEvent(Events[0]);     // tell monitor thread to terminate
        while not ThreadCompleted do Sleep(100);  // wait for it to do so before we pull the carpet //!! Issue 1183814
        end;
        CloseHandle(Events[0]);
        CloseHandle(Events[1]);
        CloseHandle(MonitorThread.Pipe);
        if Semaphore <> 0 then
          CloseHandle(Semaphore);
        Free;
      end
    else
      DeallocateHWnd(FWindowHandle);
  end;
  inherited Destroy;
end;

Properly formatted, easier to see the issue:

destructor TApdFaxDriverInterface.Destroy;
begin
  fFileName := '';
  fDocName := '';
  if not (csDesigning in ComponentState) then
  begin
    if IsWinNT then
      with MonitorThread do
      begin
        Terminate(); //!! Issue 1183814

        SetEvent(Events[0]); // tell monitor thread to terminate
        while not ThreadCompleted do Sleep(100); // wait for it to do so before we pull the carpet //!! Issue 1183814
      end;
    CloseHandle(Events[0]);
    CloseHandle(Events[1]);
    CloseHandle(MonitorThread.Pipe);
    if Semaphore <> 0 then
      CloseHandle(Semaphore);
    Free;
  end
  else
    DeallocateHWnd(FWindowHandle);
end;
inherited Destroy;
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions