VC++异常处理

1、测试代码:

#include <stdio.h>
#include <windows.h>

void main()
{
    __try
    {
        DWORD dwDemonObj = 0x0E;
        DWORD dwObjTypeAddr = dwDemonObj+0x8;
        DWORD dwObjType = *(DWORD*)dwObjTypeAddr;
        DWORD dwType = 0x2E;
        if (dwObjType != dwType)
        {
            printf("!=");
        }
        else
        {
            printf("==");
        }
    }
    __except( EXCEPTION_EXECUTE_HANDLER )
    {
        printf("catch ...
");
    }
    printf("main out
");
}

2、

3、

原文地址:https://www.cnblogs.com/cppskill/p/5526771.html