21,597
社区成员
发帖
与我相关
我的任务
分享
NTSTATUS
BulkUsb_DispatchCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{
。。。。
for(i=0; i<interface->NumberOfPipes; i++) {
if(pipeContext == &deviceExtension->PipeContext[i]) {
//
// found a match
//
BulkUsb_DbgPrint(3, ("open pipe %d\n", i));
fileObject->FsContext = &interface->Pipes[i];
ASSERT(fileObject->FsContext);
pipeContext->PipeOpen = TRUE;
ntStatus = STATUS_SUCCESS;
//
// increment OpenHandleCounts
//
InterlockedIncrement(&deviceExtension->OpenHandleCount);
//
// the device is idle if it has no open handles or pending PnP Irps
// since we just received an open handle request, cancel idle req.
//
if(deviceExtension->SSEnable) {
CancelSelectSuspend(deviceExtension);
}
}
}
}