diablocm
驱动牛犊
驱动牛犊
  • 注册日期2003-11-04
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分20分
  • 威望2点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
阅读:1222回复:0

关于厂商请求的问题,大家帮帮忙

楼主#
更多 发布于:2005-06-08 22:08
这是我的驱动IoControl的代码:
NTSTATUS TestUsbDriverDevice::TESTUSBDRIVER_IOCTL_ADON_Handler(KIrp I)
{
NTSTATUS status = STATUS_SUCCESS;

t << \"Entering TestUsbDriverDevice::TESTUSBDRIVER_IOCTL_ADON_Handler, \" << I << EOL;

__try
{
// TODO: Verify that the input parameters are correct
// If not, return STATUS_INVALID_PARAMETER

if ( I.IoctlOutputBufferSize() <= 0 || !I.IoctlBuffer())
{
t << \"IRP Error\" << EOL;
__leave;
}

// TODO: Handle the the TESTUSBDRIVER_IOCTL_ADON request, or
// defer the processing of the IRP (i.e. by queuing) and set
// status to STATUS_PENDING.

PURB pUrb = m_Lower.BuildVendorRequest(NULL, 0, 0, 1, 1);
status = m_Lower.SubmitUrb(pUrb, 0, 0, 2000L);
t << \"ad on ok\" << EOL;
// TODO: Assuming that the request was handled here. Set I.Information
// to indicate how much data to copy back to the user.
}
__finally
{
I.Information() = 0;
I.Status() = status;
}

return status;
}

但是每次发出的时候,我用BusHound查看,显示verdon,然后第2行有显示cancled,是不是这个请求被取消了??
有经验的朋友帮忙说一下,这里应该怎么弄?
我是小菜鸟,菜,菜,菜
游客

返回顶部