Dear Yang,
Thank you for your reply and I am sorry for the delay in commenting.
As I said in my original post, my software has functionality which continually checks to see if the camera is working correctly. It works something like this:
The main thread creates a worker thread and then the ZWO camera is initialised in the usual way. ASIStartVideoCapture() is then called and the worker thread continually grabs frames from the camera. Each iteration of worker thread loop sends an event back to the main thread which is used to calculate the real-time frame rate.
Once the ZWO is streaming another thread is started which continually checks to see if the worker thread is still sending events. If this thread detects that no events have occurred for a specific amount of time (something like, exposure time > 2 seconds) then I suspect that, for whatever reason, the camera has gone offline. For example, this could be because the user has altered the USB bandwidth setting to a bad value.
If my software detects that the camera is no longer delivering frames then a function is called which closes the camera. This function looks something like this:
void force_close()
{
ASIStopVideoCapture(m_ZWO_Camera_ID);
ASICloseCamera(m_ZWO_Camera_ID);
}
After the function detailed above has completed the camera is then reinitialised in the usual way. When I use 0.6.0921 ASIStopVideoCapture() and ASICloseCamera() never return which causes my software to lockup.
This works perfectly when using previous versions of your SDK but not in 0.6.0921. If I use a previous version of the SDK ASIStopVideoCapture() and ASICloseCamera() return (not lockup) even if the camera has been disconnected).
Many Thanks
NikkiM