_controlfp in C#?

L

Logan McKinley

I was told by a vendor that somehow floating point exceptions become enabled
after calling their Dll and I should call _controlfp to solve the "Overflow
or underflow in the arithmetic operation." error I am getting in my C#
application. I am having trouble finding information about _controlfp with
regards to how it effects and or how it is used in .Net.
Any Information would be appreciated
~Logan
 
L

Logan McKinley

[DllImport("msvcrt.dll")] private static extern int _controlfp(int IN_New,
int IN_Mask); // this imports the call
private const int _MCW_EM = 0x0008001f;
private const int _EM_INVALID = 0x00000010;


_controlfp(_MCW_EM, _EM_INVALID); // this is the call

~Logan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top