在服务器程序用c++调用com+时,有时出现一些异常,因处理不当而导致服务中断,向各位高手请教,以下情况该如何处理:
一、com+ 被强制停止
二、com+ 发生异常超时返回
三、com+ 发生异常无法超时返回
四、com+ 发生异常非超时返回

解决方案 »

  1.   

    the best way to troubleshoot this  would be to dump the process.
    1. Go to www.microsoft.com/ddk/debugging and download the latest version of 
    the debuggers  onto the problem server.
    2. ADPlus.vbs is also downloaded with the debuggers, and this is the script 
    you will use to invoke the debugger.  For more information on ADPlus, see 
    the following KB: 
     HOWTO: Use AutodumpPlus to Troubleshoot "Hangs" and "Crashes" in a 
    WinDNA/.NET Environment
     http://support.microsoft.com/support/kb/articles/Q286/3/50.ASP
    3. Make sure that your COM exe is running.  You may have to submit an 
    initial request from your client application to start it.  You do not want 
    the AV to occur before you attach the debugger (step 5, below).
    4. Open a DOS window & navigate to the directory where ADPlus.vbs is 
    installed.
    5. Run the following command in the DOS window:
     adplus -quiet -crash -pn MyCOM.exe
    6. Now allow the application to run.  The next time you notice the event 
    log entries mentioned below, you will notice that a large dump file (*.dmp) 
    has been created in a subdirectory where ADPlus.vbs is installed.
    7. If you are familar with Windbg, you can read the dumps yourself.  
    Otherwise, you'll need to open a support case w/ Microsoft to have us read 
    the dumps & ascertain why you're AV'ing.