I currently have my project running two separate threads (one for MFC operations, like views/formviews, application window, etc., and one for an infinite while loop in its main function). However, for certain situations, when I run my program in debug mode, I have noticed that one of the threads' exit status was a 1 (in other words, it returned a non-zero number to the operating system). While running the application in Visual Studio 2005, what would be easiest way of finding out which thread is responsible for the return value so that I can troubleshoot what's going on? Thanks in advance.
Incorporating Steve Gilham's suggestion:
After investigating which thread is responsible for the error by looking at Spy++, I have pinned down to the single line of hdlUninitDevice() call from Novint Falcon SDK being responsible for this return message. Returning a failure status from this call doesn't make an error message pop up. However, I don't know if this is a major deal that is essential to deal with on a larger context. It would be great to listen to more suggestions. Thanks.