Ice@P
驱动牛犊
驱动牛犊
  • 注册日期2002-12-09
  • 最后登录2003-10-18
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:989回复:1

为什么不能在onstartdevice()里面加断点?

楼主#
更多 发布于:2003-02-25 22:18
驱动为pci卡,系统自动加载的.
驱动的其他函数加断点没问题,但一在onstartdevice()里面加断点,驱动运行到onstartdevice()
就会死机.如果不在onstartdevice()里面加断点的话程序正常运行. 能输出结果.

程序如下:
NTSTATUS CryptpciDevice::OnStartDevice(KIrp I)
{
ULONG r1;
t << \"ICE Entering CryptpciDevice::OnStartDevice\\n\";

NTSTATUS status = STATUS_SUCCESS;

I.Information() = 0;

// The default Pnp policy has already cleared the IRP with the lower device
// Initialize the physical device object.

// Get the list of raw resources from the IRP
PCM_RESOURCE_LIST pResListRaw = I.AllocatedResources();
// Get the list of translated resources from the IRP
PCM_RESOURCE_LIST pResListTranslated = I.TranslatedResources();

KPciConfiguration PciConfig(m_Lower.TopOfStack());
status = m_IoPortRange0.Initialize(
pResListTranslated,
pResListRaw,
PciConfig.BaseAddressIndexToOrdinal(0)
);
if (!NT_SUCCESS(status))
{
Invalidate();
return status;
}
    // The base class will handle completion

r1=m_IoPortRange0.ind(HDCR);
t << \"Suceess Read the register\" << \" HDCR =\" <<(ULONG) r1 << EOL ;
r1=m_IoPortRange0.ind(HSR);
    t << \"Suceess Read the register\" << \" HSR =\" <<(ULONG) r1 << EOL ;
r1=m_IoPortRange0.ind(DSPP);
t << \"Suceess Read the register\" << \" DSPP =\" <<(ULONG) r1 << EOL ;
return status;
}

这是为什么?
怎么解决?

认认真真过一生
Ice@P
驱动牛犊
驱动牛犊
  • 注册日期2002-12-09
  • 最后登录2003-10-18
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-02-26 21:04
不会吧,没有人回答?

 :mad: :mad: :( :(
认认真真过一生
游客

返回顶部