下面的代码,看不明白,帮忙看看
#if defined (_MT) || defined (_DLL)
#defineExceptionPtr((long **)__pxcptinfoptrs())
#else
#defineExceptionPtr((long *)_pxcptinfoptrs)
#endif
#if defined (_MT) || defined (_DLL)
#defineLogExceptionAny(whereFile, whereLine) {\
char buff[256] = { 0 };\
strcpy(buff, "Catch Exception ");\
char bufftemp[256] = { 0 };\
if ( *(ExceptionPtr) ) {\
(void)sprintf(bufftemp, "P0: %08x ", (**(ExceptionPtr)) );\
strncat (buff, bufftemp, strlen(bufftemp));\
memset(bufftemp, 0, sizeof(bufftemp)); }\
if ( *(ExceptionPtr+1) ) {\
(void)sprintf(bufftemp, "P1: %08x ", (**(ExceptionPtr+1)) );\
strncat (buff, bufftemp, strlen(bufftemp));\
memset(bufftemp, 0, sizeof(bufftemp)); }\
if (*(ExceptionPtr+2)) {\
(void)sprintf(bufftemp, "P2: %08x ", (**(ExceptionPtr+2)) );\
strncat (buff, bufftemp, strlen(bufftemp));\
memset(bufftemp, 0, sizeof(bufftemp)); }\
if ( *(ExceptionPtr+3) ) {\
(void)sprintf(bufftemp, "P3: %08x ", (**(ExceptionPtr+3)) );\
strncat (buff, bufftemp, strlen(bufftemp));\
memset(bufftemp, 0, sizeof(bufftemp)); }\
if ( *(ExceptionPtr+4) ) {\
(void)sprintf(bufftemp, "P4: %08x ", (**(ExceptionPtr+4)) );\
strncat (buff, bufftemp, strlen(bufftemp));\
memset(bufftemp, 0, sizeof(bufftemp)); }\
if ( *(ExceptionPtr+5) ) {\
(void)sprintf(bufftemp, "P5: %08x ", (**(ExceptionPtr+5)) );\
strncat (buff, bufftemp, strlen(bufftemp));\
memset(bufftemp, 0, sizeof(bufftemp)); }\
if ( *(ExceptionPtr+6) ) {\
(void)sprintf(bufftemp, "P6: %08x ", (**(ExceptionPtr+6)) );\
strncat (buff, bufftemp, strlen(bufftemp)); }\
__LogException(buff,whereFile,whereLine);\
}
#else
[解决办法]
头晕!
帮顶下!
[解决办法]
捕捉异常,并贴出出错原因.