zoukankan      html  css  js  c++  java
  • RaiseFailFastException函数

    引发绕过所有异常处理程序(基于帧或矢量)的异常。引发此异常将终止应用程序并调用Windows错误报告(如果Windows错误报告正在运行)。

    原型:

    VOID WINAPI RaiseFailFastException(
      __in_opt  PEXCEPTION_RECORD pExceptionRecord,
      __in_opt  PCONTEXT pContextRecord,
      __in      DWORD dwFlags
    );
    

    参数:

    • pExceptionRecord [in, optional]
      指向包含异常信息的异常记录结构的指针。必须指定ExceptionAddress和ExceptionCode成员。如果此参数为空,则函数将创建异常记录,并将ExceptionCode成员设置为STATUS_FAIL_FAST_EXCEPTION。如果dwFlags参数包含FAIL_FAST_GENERATE_EXCEPTION_ADDRESS标志,则该函数还将设置ExceptionAddress成员。
    • pContextRecord [in, optional]
      指向包含上下文信息的上下文结构的指针。如果为空,此函数将生成上下文(但是,上下文将与调用方的上下文不匹配)。
    • dwFlags [in]
      可以指定零个或一个或多个以下标志来控制此函数的行为:
      ValueMeaning
      FAIL_FAST_GENERATE_EXCEPTION_ADDRESS 0x1

      Causes RaiseFailFastException to set the ExceptionAddress of EXCEPTION_RECORD to the return address of this function (the next instruction in the caller after the call to RaiseFailFastException). This function will set the exception address only if ExceptionAddress is NULL.

      FAIL_FAST_NO_HARD_ERROR_DLG 0x2

      If the Windows Error Report service is not running when an unhandled exception occurs, a message box is diplayed to the user that identifies the address where the exception occurred. To prevent the message box from being displayed to the user, and to fail silently, set this flag.

    返回值:无

    通常,如果应用程序处于错误状态,并且希望立即终止并创建Windows错误报告,则调用此函数。 如果WER服务未运行或没有任何调试器附加到进程,则该进程将被终止。此函数引发第二次机会异常。如果启用了JIT调试,则调试器将附加到进程。

    支持环境:

    Minimum supported client Windows 7
    Minimum supported server Windows Server 2008 R2
    Header Winbase.h (include Windows.h)
    Library Kernel32.lib
    DLL Kernel32.dll
  • 相关阅读:
    HDU 4536 XCOM Enemy Unknown ( 状态压缩+搜索)
    HDU 4535 吉哥系列故事——礼尚往来(水题,错排)
    HDU 4541 Ten Googol
    HDU 4544 湫湫系列故事——消灭兔子 (优先队列)
    HDU 4530 小Q系列故事——大笨钟(水题)
    HDU 4505 小Q系列故事——电梯里的爱情 (水题)
    HDU 2197 本原串 (数学)
    HDU 4540 威威猫系列故事——打地鼠 (简单DP)
    oracle数据库恢复
    编程中的命名设计那点事(转)
  • 原文地址:https://www.cnblogs.com/yilang/p/11822080.html
Copyright © 2011-2022 走看看