首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

下面的代码,看不明白,帮忙看看,该如何解决

2012-02-10 
下面的代码,看不明白,帮忙看看#ifdefined(_MT)||defined(_DLL)#defineExceptionPtr((long**)__pxcptinfopt

下面的代码,看不明白,帮忙看看
#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

[解决办法]
头晕!
帮顶下!
[解决办法]
捕捉异常,并贴出出错原因.

热点排行