Home > Software engineering >  Excel com add-in collapsed, how to create the DMP file
Excel com add-in collapsed, how to create the DMP file

Time:11-22

Ask how the excel com add-in untreated exception occurs, generate DMP file, I have tried to use SetUnhandlExceptionFilter, but every time is to collapse, set the callback function has no response to the reference blog link below: https://blog.csdn.net/hiwubihe/article/details/52648002, their implementation exe can generate collapse package, but there is no role in excel com add-in

CodePudding user response:

Try/catch ()?

CodePudding user response:

reference 1/f, 7-eleven's response:
try/catch ()?
we hope is that when we have unknown exception occurs, we can generate the corresponding DMP file, and then use the DMP file for analysis,

CodePudding user response:

No one know? We create a DLL, the DLL is excel loaded, but abnormal crash to be captured in the excel, we hope that the message can be our DLL

CodePudding user response:

SetUnhandlExceptionFilter handle may be modified,
Can try __try __except his capture SEH exception, then MiniDumpWriteDump crash log output can be debugging

CodePudding user response:

reference 4 floor zgl7903 response:
SetUnhandlExceptionFilter handle may be modified,
Can try __try __except his capture SEH exception, then MiniDumpWriteDump crash log output can be debugging
thank you, before I tried this method is effective, but there is a problem, or not convenient place, __try __except is not permitted in the code inside the definition of local variable, such as: define a cstrings variables, will compile failure, must be encapsulated into a function, and then into the __try inside, what method can let he allows the definition of local variable?

CodePudding user response:

Another packaging function

Fun xx (xx)} {XXX XXX

__try {fun ()} __except (XXX)


CodePudding user response:

refer to 6th floor zgl7903 response:
encapsulate again function

Fun xx (xx)} {XXX XXX

__try {fun ()} __except (XXX)
thank you, before I tried this method, only if the code is more, every function to encapsulate a feel more troublesome, do you have any other good method
  • Related