I have a piece of program written in Visual C++ which works just fine in Win XP. However when its run in Vista, the error message "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." is shown only when I exit the program (the program is exited in a correct manner). Only the "Close program" button is available for clicking.
Actually, everything just works fine but the message pops up when program is exited. All data read and write are correct. Applications behave and respond correctly before the exit.
I suspect that its some kind of incompatibility to Vista in my codes. Please advise. Thank you!