Re: About using IoCompleteRequest and iostatus block's Status Field.



You have a number of problems:

1. You cannot pend most PNP IRP's you need to complete them, or send them
on as specified in the DDK documentation.

2. You should either mark an IRP pending (using IoMarkIrpPending) and
return STATUS_PENDING or complete the IRP with IoCompleteRequest.

3. Your driver doesn't specifiy the resources, you recieve the resources
from the PNP manager.

I would recomend getting a good book on Windows Drivers such as "Programming
the Windows Driver Model Second Edition" or better yet taking a class on
windows drivers. You are very confused on what are basic's of the system.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply



"sudhanshu deshmukh" <sudhanshudeshmukh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:9EBB8048-EFD3-4A7E-ABC8-2A2A3EE30C1D@xxxxxxxxxxxxxxxx
> Respected sir,
>
> I want to know as to, when I use the IoCompleteRequest
> Function in the DispatchPnp Routine/Function, and that, when I also set
> the
> IoStatus block's Status Field to STATUS_ PENDING (pending because I want
> to
> make use of pending irp in the driver's system thread to process pnp
> irp_mn_xxx minor codes), my driver don't seem to work ? I want to set the
> IRP
> Pending Status in the Status Field of IoStatus Block, in order to make
> further use of the IRP, which I already been marked as STATUS_PENDING, in
> my
> driver's System Thread to further process IRP_MJ_XXX AND ITS MINOR CODES
> like
> irp_mn_start_xxx etc. At the same time, I may also like to know as to, how
> can I allocate IRP, when my driver is running the system thread ? Which
> Function should I use (minor pnp codes like irp_mn_xxx ) to pass down the
> io_resource_requirements_list to make sure that pnp manager and OS must
> know
> the resources available thereof. How can I set the IRP in pending state
> and
> also how can I make use of this PENDING IRP in the driver's system thread
> in
> order to process IRP_MJ_XXX AND IRP_MN_XXX both, major and minor codes
> respectively ? How can I make sure that, the default resource descriptors,
> which are already been setted up by the driver will not overwritten i.e.
> to
> protect already stored default resource information and at the same time
> to
> store additional resource descriptors to IO_RESOURCE_REQUIREMENTS_LIST, so
> that, PNP MANAGER AND OS will know about the additional resource info.,
> that
> I provided with. As it is also crucially needed in my case.
>
>
>
> regards,
>
> sudhanshu


.



Relevant Pages

  • Re: IRP_MJ_READ asynchronous completion
    ... propagating the pending bit via IoMarkIrpPending in their completion ... , what does the IRP stack look like? ... Any idea what I do wrong or where I could have messed up my driver? ...
    (microsoft.public.development.device.drivers)
  • Re: About using IoCompleteRequest and iostatus blocks Status Field.
    ... You cannot pend most PNP IRP's you need to complete them, ... return STATUS_PENDING or complete the IRP with IoCompleteRequest. ... Your driver doesn't specifiy the resources, ... How can I make sure that, the default resource descriptors, ...
    (microsoft.public.development.device.drivers)
  • Re: DeviceIoControl, Overlapped vs Non-Overlapped: How it affects driver design?
    ... may still call IoCompleteRequest from the dispatch routine, ... previously marked the irp as pending, ... you do need to do something special in the driver. ...
    (microsoft.public.development.device.drivers)
  • Re: help to handle IRP_MN_STOP_DEVICE and IRP_MN_START_DEVICE in Usb device?
    ... concetrate on implementing the guts of your driver ... Because my usb modem driver works uncorrectly in vista about pnp, ... when i pass irp to next driver stack, ... sorry,I am not going to learn KMDF now. ...
    (microsoft.public.development.device.drivers)
  • Re: About using IoCompleteRequest and iostatus blocks Status Field.
    ... You don't seem to understand some very basic concepts of NT driver. ... IoStatus block's Status Field to STATUS_ PENDING (pending because I want ... make use of pending irp in the driver's system thread to process pnp ... How can I make sure that, the default resource descriptors, ...
    (microsoft.public.development.device.drivers)

Loading