Skip to content

服务器托管,北京服务器托管,服务器租用-价格及机房咨询

Menu
  • 首页
  • 关于我们
  • 新闻资讯
  • 数据中心
  • 服务器托管
  • 服务器租用
  • 机房租用
  • 支持中心
  • 解决方案
  • 联系我们
Menu

__except(exception_int_divide_by_zero_filter(GetExceptionInformation()))

Posted on 2023年9月20日2023年9月20日 by hackdl

#include 
#include 
#include 
 
int exception_access_violation_filter(LPEXCEPTION_POINTERS p_exinfo)
{
	if(p_exinfo->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
	{
	printf("存储保护异常n");
	return 1;
	}
	else
	 return 0;
}
 
int exception_int_divide_by_zero_filter(LPEXCEPTION_POINTERS p_exinfo)
{
	if(p_exinfo->ExceptionRecord->ExceptionCode == EXCEPTION_INT_DIVIDE_BY_ZERO)
	{
	printf("被0除异常n");
	return 1;
	}
	else 
	return 0;
}
 
void main()
{
	int num;
puts("hello");
	__try
	{
		__try
		{
			int* p;
 
			// 下面将导致一个异常
			p = 0;
			*p = 45;
		}
		// 注意,__except模块捕获一个存储保护异常
		__except(exception_access_violation_filter(GetExceptionInformation()))
		{
			puts("内层的except块中");
		}
		num=2;
		num=num/0;
	}
	// 注意,__except模块捕获一个被0除异常
	__except(exception_int_divide_by_zero_filter(GetExceptionInformation())) 
	{
	puts("外层的except块中");
	}
 
puts("world");
}
/*
hello
存储保护异常
内层的except块中
被0除异常
外层的except块中
world
Press any key to continue
*/

服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net

相关推荐: ChatGPT在线访问网站

目录 gpttalk.live chatgpt-cn.co Chat机器人 Hzdis.cn chat.jinshutuan.com chatgpt-mirror gpttalk.live 网址:https://gpttalk.live/ 限制:每天限制使用次…

Related posts:

  1. 绍兴idc机柜租用
  2. 高效托管,稳定运行:服务器托管机器
  3. Oracle SQL 两个日期类型毫秒值求差,日期转毫秒,时间差(ms)自定义函数解决毫秒差
  4. 服务器托管常见故障如何处理
  5. 北京文件托管服务器:高效稳定的文件管理服务

服务器托管,北京服务器托管,服务器租用,机房机柜带宽租用

服务器托管

咨询:董先生

电话13051898268 QQ/微信93663045!

上一篇: 【Redis】聊一下Redis的哨兵机制
下一篇: JPA在事务结束时自动更新查询数据

最新更新

  • 多模块项目使用枚举配置spring-cache缓存
  • 华为云HBase冷热分离最佳实践
  • C语言/C++ 之 打飞机游戏
  • Java开发面试–nacos专区
  • 自学前端简历怎么写?项目怎么学?

随机推荐

  • 物理服务器租用的安全保障
  • 银行托管:服务器安全签退
  • 机房托管服务器的六大优势
  • 国内VPS服务器租用:高效稳定的网络解决方案
  • Git Commit Message 应该怎么写?

客服咨询

  • 董先生
  • 微信/QQ:93663045
  • 电话:13051898268
  • 邮箱:dongli@hhisp.com
  • 地址:北京市石景山区重聚园甲18号2层

友情链接

  • 服务器托管
  • 机房租用托管
  • 服务器租用托管
©2023 服务器托管,北京服务器托管,服务器租用-价格及机房咨询 京ICP备13047091号-8