How could I interrupt SMS sending process?

Hello. I'm writing multithreaded application and use TGSM component in it. Sometimes I need to close my application immediately and gracefully while GSM component is trying to send SMS. When I invoke GSM.Close, it closes COM port, closes connection, but it takes some time to raise error. Obviously, I can catch that error, but I want to avoid waisting time on it. I realize, that component is waiting for answer from Com device, but what should I do to close GSM component immediately? Is it possible or not?

Thanks,
Max

TGSM.Close

TGSM.Close is correct way but it seems that TGSM.SendATCommand() waits for reply even when ComDevice is already closed and component in csDestroying state. Error message should be still raised in sending thread but terminate immediately.

Tomas

Thank you for reply,

Thank you for reply, Tomas.

Regards,
Max