关于delphi软件运行出现Invalid floating point operation的错误的解决办法_Android, Python及开发编程讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  Android, Python及开发编程讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3715 | 回复: 0   主题: 关于delphi软件运行出现Invalid floating point operation的错误的解决办法        上一篇   下一篇 
    本主题由 Administrator 于 2019-9-10 20:51:19 移动
langlanglang
注册用户
等级:列兵
经验:97
发帖:2
精华:0
注册:2017-3-9
状态:离线
发送短消息息给langlanglang 加好友    发送短消息息给langlanglang 发消息
发表于: IP:您无权察看 2019-9-10 15:18:07 | [全部帖] [楼主帖] 楼主

关于delphi软件运行出现Invalid floating point operation的错误的解决办法
软件如果有webbrowser载入网页的时候经常会出现这个错误。这个错误是webbrowser3个Bug之一。
具体行程的原因大概我也不知道。基本是如果XP系统编译的,放到vista或者V7就容易出现这个错误。具体解决的办法也是很简单的。
查看官方的解决办法如下。

When running floating point code, such as that found in Direct 3D, you will often get a series of floating point exceptions. Microsoft supporesses these exceptions by default, but we raise them. It is easy to turn this option off in both C++Builder and Delphi.
Here is how to turn them off in C++Builder:
#include float.h
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
      _control87(MCW_EM, MCW_EM);
}
Here is how to turn them off in Delphi:
const
MCW_EM = DWord($133f);
begin
Set8087CW(MCW_EM);
end;


这是官方解决方案,大体的意思就是加上两句代码。具体家在哪里我说明一下。

const


    MCW_EM = DWord($133f); 这一句是定义的常量,当然是写在定义常量的地方。
    Set8087CW(MCW_EM); 这一句就写在窗体创建的部分就可以了
就这么简单

该贴由system转至本版2019-9-10 20:51:18




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论