Hi Sir
Thanks for this kind response.As i told i am using BulkUsb sample.i have
implemented only few controls…
Reading Operation fails and it holts the program flow for some time. The
return status code is C0000120.This is the code of that section.
rwContext->Urb = urb;
rwContext->Mdl = mdl;
rwContext->Length = totalLength - stageLength;
rwContext->Numxfer = 0;
rwContext->VirtualAddress = virtualAddress + stageLength;
rwContext->DeviceExtension = deviceExtension;
nextStack = IoGetNextIrpStackLocation(Irp);
nextStack->MajorFunction = IRP_MJ_INTERNAL_DEVICE_CONTROL;
nextStack->Parameters.Others.Argument1 = (PVOID) urb;
nextStack->Parameters.DeviceIoControl.IoControlCode =
IOCTL_INTERNAL_USB_SUBMIT_URB;
IoSetCompletionRoutine(Irp,
(PIO_COMPLETION_ROUTINE)BulkUsb_ReadWriteCompletion,
rwContext,
TRUE,
TRUE,
TRUE);
IoMarkIrpPending(Irp);
ntStatus = IoCallDriver(deviceExtension->TopOfStackDeviceObject,
Irp);
As i think the error is due to my driver stack is not connected to
system stack.If so then how i will connect my driver stack to controlers
stack , or system stack.
Niraj
On 6/15/06, Tim Roberts wrote:
>
> Niraj Jha wrote:
>
> > Hi
> >
> > I have Created a usb driver based on bulkusb from ddk.in
> > http: this IRP_MJ_INTERNAL_DEVICE_CONTROL got cancelled.
> > what should be the possible reason for that…Can i send more details
>
>
> You certainly will need to send more details. Do you really mean
> “cancelled”, as in “my cancel routine gets called”, or do you mean that
> it returns with an error? Which error? Does it return immediately, or
> does it take time? What kind of URB are you sending? Can you post the
> code that creates the URB and IRP clear through to the IoCallDriver?
>
> > I think my driver is not communicating with the host. How i will
> > attach my device to the host…
>
>
> I don’t understand the question. You ARE the host. Do you mean the USB
> host controller? If so, your driver wouldn’t have been loaded unless
> your device was already attached. Bulkusb dumps the configuration data
> to the debug log. Does that show the pipe info you expect?
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
></http:>