Twain Driver Hang the System
Twain Driver Hang the System
Hi,
We are a software house evaluating you gdTwain OCX. Is well build and simple to use.
My actual problem is in releasing twain resource.
If the code flow right and all releasing method are called (like TwainCloseSource, TwainCloseSourceManager, TwainUnloadSourceManager) there are no problems at all.
But if something stop the code flow and this method are not executed twain resource stay "hanged" (twain status is between SourceManagerOpen and SourceOpen).
I find no way to release the twain resource and i have to restart the OS (windows 2000 pro in my case).
In distributed app this can't, teorically, happen... i know. But in developping this happen often and is very anoying.
You know a method or a workaround to release this resource (like terminate some kind of process or dll ) ???
Tnks in advance for reply
We are a software house evaluating you gdTwain OCX. Is well build and simple to use.
My actual problem is in releasing twain resource.
If the code flow right and all releasing method are called (like TwainCloseSource, TwainCloseSourceManager, TwainUnloadSourceManager) there are no problems at all.
But if something stop the code flow and this method are not executed twain resource stay "hanged" (twain status is between SourceManagerOpen and SourceOpen).
I find no way to release the twain resource and i have to restart the OS (windows 2000 pro in my case).
In distributed app this can't, teorically, happen... i know. But in developping this happen often and is very anoying.
You know a method or a workaround to release this resource (like terminate some kind of process or dll ) ???
Tnks in advance for reply
Hi Loic,
i need some help with twain issues and i think your experience can help
We have bought the last release of PicturePro that include twain capabilities.
We still have some problem with Twain hanging the system and require a OS reboot (and this is a big problem for Server).
In this case i think gdPicture is not the problem. I think is a general OS problem. I try to explain:
In many case when scanning is interrupted (by user, by paper jam, by "someone disconnetting the usb cable (lol)", ecc. ecc.) the twain device remain "open". And there is no way to "reset" it or free it without reboot the system.
Probably there is a way to know i OS (windows ) have any device open and a way to kill the opened process or something like that.
You know about any API to do this ? Also a name or a hint can help....
i need some help with twain issues and i think your experience can help
We have bought the last release of PicturePro that include twain capabilities.
We still have some problem with Twain hanging the system and require a OS reboot (and this is a big problem for Server).
In this case i think gdPicture is not the problem. I think is a general OS problem. I try to explain:
In many case when scanning is interrupted (by user, by paper jam, by "someone disconnetting the usb cable (lol)", ecc. ecc.) the twain device remain "open". And there is no way to "reset" it or free it without reboot the system.
Probably there is a way to know i OS (windows ) have any device open and a way to kill the opened process or something like that.
You know about any API to do this ? Also a name or a hint can help....
Hi Sarzan,
It is a good question...
The best way to close the twain source after an acquisition process is to call the TwainCloseSource method: https://www.gdpicture.com/references/gdp ... ource.html
In server mode a tip consists to add a timer into your form which will call this methods in order to prevent from too long pause into your code.
Else, you can catch the terminate event of your application and include a call to the TwainUnloadSourceManager method inside:
https://www.gdpicture.com/references/gdp ... nager.html
I don't see other solutions. In all cases if your application has opened a source she must close it.
Best regards,
Loïc
It is a good question...
The best way to close the twain source after an acquisition process is to call the TwainCloseSource method: https://www.gdpicture.com/references/gdp ... ource.html
In server mode a tip consists to add a timer into your form which will call this methods in order to prevent from too long pause into your code.
Else, you can catch the terminate event of your application and include a call to the TwainUnloadSourceManager method inside:
https://www.gdpicture.com/references/gdp ... nager.html
I don't see other solutions. In all cases if your application has opened a source she must close it.
Best regards,
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest