Im using undetermined DLLs which can use undetermined resources such as a COM port. Some DLL methods don't have their own timeouts, so i am forced to abort the execution thread. But if for instance it is trying to communicate with a machine over any COM port, and i abort the thread, my program crashes with the error “Safe handle has been closed”. I know it is because a resource is being used but is there any way at all to catch this exception and skip, rather than an actual crash?
Aucun commentaire:
Enregistrer un commentaire