I try to connect a remote modem with VaModem.
In case there is no carrier, I want to close the assigned Comport, but the program is hanging than.
My code looks like the following:
VaModem1.Dial(PhoneNumber);
procedure TForm1.VaModem1NoCarrier(Sender: TObject);
begin
case vaModem1.ModemAction of
maDial: vaModem1.Cancel;
end;
VaModem1.Hangup(true);
VaModem1.Active := false;
VaComm1.Close; //here the program is hanging!!!
end;
begin
case vaModem1.ModemAction of
maDial: vaModem1.Cancel;
end;
VaModem1.Hangup(true);
VaModem1.Active := false;
VaComm1.Close; //here the program is hanging!!!
end;
Can anybody help?
Juergen