CPort.pas에서 PurgeComm Exception을 예외 처리하시는 방법이 있습니다.
procedure TCustomComPort.AbortAllAsync;
begin
try
if not PurgeComm(FHandle, PURGE_TXABORT or PURGE_RXABORT) then
//raise EComPort.Create
CallException(CError_PurgeFailed, GetLastError);
except on E: Exception do
Application.ProcessMessages;
end;
end;
이노야 님이 쓰신 글 :
: c-port에서 포트가 오픈된 상태에서 USB to Serial 케이블을 제거하면 PurgeComm function failed(Error:22)와 같은 에러가 나네요.
: 참고로 장비나 케이블은 아무 문제가 아니예요. 윈도우 하이퍼터미날에서 테스트 해봣는데 아무 이상이없어요.
: 뭐가 문젤까요. 델7이고요 cport 4를 사용하고 있어요. 혹시 c-port만 그런가요. del7, 2010, xe5에서도 마찬가집니다.
|