Код:
procedure TEditPersonsForm.RadioGroup1Click(Sender: TObject);
begin
if radiogroup1.ItemIndex=0 then
opencomport;
if radiogroup1.ItemIndex=1 then
begin
closecomport;
end;
end;
procedure TEditPersonsForm.closecomport;
begin
rt.Terminate;
CloseCom(ftHandle);
end;
procedure TEditPersonsForm.opencomport;
begin
ftHandle := InitCom(0);
if ftHandle <> COMInvHandle then
begin
rt := TReadCardThread.Create(true);
rt.HWND := Handle;
rt.usb := ftHandle;
rt.Resume;
end else
begin
end;
end;
выходит ошибка {access violation at address 00425EBC in module 'project1.exe'. Write of address 0000000D}
не подскажите как исправить?