内存读写错误的对话框?有两中的,DEBUG是传输进程自己弹出来的,如果是release则是华生医生弹出来的。不知道LZ说的是那种。

解决方案 »

  1.   

    其实可以这么做,令传输进程出错时不产生那个错误对话框:
    创建传输进程的时候,修改该进程的ErrorMode:
    UINT SetErrorMode(
      UINT uMode
    );0 Use the system default, which is to display all error dialog boxes. 
    SEM_FAILCRITICALERRORS The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling process. 
    SEM_NOALIGNMENTFAULTEXCEPT 64-bit Windows:  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.
    After this value is set for a process, subsequent attempts to clear the value are ignored.
     
    SEM_NOGPFAULTERRORBOX 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 The system does not display a message box when it fails to find a file. Instead, the error is returned to the calling process.