驱动编程中出现BAD_POOL_HEADER错误--转

以下是引用MSDN上的:

Cause
The pool is already corrupted at the time of the current request.

This may or may not be due to the caller.

Resolving the Problem
The internal pool links must be walked to figure out a possible cause of the problem.

Then you can use special pool for the suspect pool tags, or use Driver Verifier on the suspect driver. The !analyze debugger extension may be of help in pinpointing the suspect driver, but this is frequently not the case with pool corrupters.

我实际遇到的这个例子是我的GUI程序和驱动程序通信时在DeviceIOControl中出现的,当时并没有判断GUI提供的缓冲区是否够了,然后就向里面pIrp->AssociatedIrp.SystemBuffer直接拷贝数据。

这个错误估计是和堆栈溢出差不多的,多余的数据覆盖了IRP的一部分,导致在这个DeviceIOControl函数的结尾

pIrp->IoStatus.Status = status;
pIrp->IoStatus.Information = info; // bytes xfered
IoCompleteRequest( pIrp, IO_NO_INCREMENT );
return status;

出现了这个错误。

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/instruder/archive/2010/04/13/5482203.aspx

转载于:https://www.cnblogs.com/xinjun/archive/2010/06/03/1750945.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值