From: Hector Santos on
Jochen Kalmbach [MVP] wrote:

> Hi Rahul!
>
>> But the question is, the flags are getting changed only when we are
>> doing Ctrl+C (copy action) inside the file open dialog shown by
>> GetOpenFileName. This looks strange..
>
> This is quite "normal"... If you open the "FileOpenDialog", then all
> shell extensions get loaded in *your* process... and one of this
> extensions seems to change the floating-point control wird ;)
>
> This is a "normal" bug...

So he needs to reset it after returning from FileOpenDialog()?

Interesting.

--
HLS
From: Jochen Kalmbach [MVP] on
Hi Hector!

>> This is a "normal" bug...
>
> So he needs to reset it after returning from FileOpenDialog()?
>
> Interesting.

I have seens many "shell extensions" and other "hook-dlls" which change
the floating point settings.

From my point of view: It is unpossible to detect if the settings where
changed... the design of the floating-point-control word is the main
problem... if there were nothing to change/control, then there would be
no problem...

In general, there is no good rule to prevent changes or to garantee the
correct executing of your floating point opertion except:

// Set MY control word...
// Execute floating point operation...

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
From: Rahul on
On Apr 17, 8:56 pm, "Jochen Kalmbach [MVP]" <nospam-n...(a)kalmbach-
software.de> wrote:
> Hi Hector!
>
> >> This is a "normal" bug...
>
> > So he needs to reset it after returning from FileOpenDialog()?
>
> > Interesting.
>
> I have seens many "shell extensions" and other "hook-dlls" which change
> the floating point settings.
>
>  From my point of view: It is unpossible to detect if the settings where
> changed... the design of the floating-point-control word is the main
> problem... if there were nothing to change/control, then there would be
> no problem...
>
> In general, there is no good rule to prevent changes or to garantee the
> correct executing of your floating point opertion except:
>
> // Set MY control word...
> // Execute floating point operation...
>
> --
> Greetings
>    Jochen
>
>     My blog about Win32 and .NET
>    http://blog.kalmbachnet.de/

Thanks Jochen,
That was very helpful, now we understand the exact reason.
We will try to prevent all dived by zero in the code, to be on the
safer side :-)

Thanks again
Rahul