First of all, some background:
My software which is written in VC++ relies on some large third party DLL's that get loaded along with my app. These libs often raise Floating point exceptions during their normal course of operation, but they are not signaled as hardware exceptions because of the default configuration of Floating point Control word to mask these exceptions and hence the program does not crash because of these.
Now the issue is that when some third party programs like Zeallsoft Super Screen Capture inject their own DLLs which are written in Borland C++, they set the FP Control Word to enable the Floating point exceptions and my app crashes because of that.
While the main issue might be with the third party lib and the third party software that is injecting its own Dll's, I still want to protect my software from crashing because of such an issue.
The solution that I can think of is to some how get notification of Dll loads happening inside my process and ensure that the FP control word is reset to default value after the dll load happens.
So I am looking for simple and effective ways to achieve that. Is there some way to get notified of Dll loads happening in my process? Are there any other way of achieving what I want to do? The only thing that I want to be wary of is that the method should work on Win 2k and WinXP and higher and secondly the method used should not be of a nature that can potentially trigger the malware heuristics of Anti-virus/spyware scanners.