SetErrorMode Function

本文介绍了Windows API函数SetErrorMode的详细用法,该函数用于控制系统或进程如何处理严重错误。文章列举了不同参数值的意义及其对错误处理的影响,如避免显示特定类型的错误对话框等。

Controls whether the system will handle the specified types of serious errors or whether the process will handle them.

系统或者进程是否处理指定类型错误

UINT WINAPI SetErrorMode(
  __in          UINT uMode
);

Parameters
uMode

The process error mode. This parameter can be one or more of the following values.

进程错误模式,参数值可以是以下一个或多个值

Value
Meaning

0

Use the system default, which is to display all error dialog boxes.使用系统用默认有的全球错误对话框显示

 

SEM_FAILCRITICALERRORS
0x0001

The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling process.

系统不显示critical-error-handler 消息对话框,只是把错误信息发到调用进程

 

SEM_NOALIGNMENTFAULTEXCEPT

0x0004

The system automatically fixes memory alignment faults and makes them invisible to the application. It does this for the calling process and any descendant processes. This feature is only supported by certain processor architectures. For more information, see the Remarks section.

After this value is set for a process, subsequent attempts to clear the value are ignored.

系统自动处理内存队列中的错误,对应用程序来说是不可见的。

 

SEM_NOGPFAULTERRORBOX

0x0002

The system does not display the general-protection-fault message box. This flag should only be set by debugging applications that handle general protection (GP) faults themselves with an exception handler.

系统不显示 一般默认的消息对话框。

SEM_NOOPENFILEERRORBOX

0x8000

The system does not display a message box when it fails to find a file. Instead, the error is returned to the calling process.

转载于:https://www.cnblogs.com/eping/archive/2010/07/03/1770407.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值