Doron
Fri Feb 10 00:34:57 CST 2006
yes. it is the most fool proof way to clear out the previous
status/information/cancel flag and reset the current stack location back to
the top. i don't see what the big deal is here. Instead of doing something
by hand, you have a tested and well documented call that does it which is
written by the folks who understand IRPs in and out.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Alexander Grigoriev" <alegr@earthlink.net> wrote in message
news:OZzQaJZLGHA.2276@TK2MSFTNGP15.phx.gbl...
> Do you really need to call IoReuseIrp on IRP that's passed to your
> completion routine and you just want to resubmit it?
>
> "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
> news:upLzusTLGHA.3944@tk2msftngp13.phx.gbl...
>> it is that frequent. a read always needs to be pending. there is alot
>> less trouble in keeping the same irp around vs freeing it. why? b/c
>> allocating can fail and what do you do then? have the mouse stop moving?
>> fwd progress is important, esp if you can preallocate all the resources
>> you will ever need during start device and then just them for the
>> lifetime of the device.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
>> news:u$qlzoMLGHA.3496@TK2MSFTNGP14.phx.gbl...
>>> Does mouser do the polling that frequently that it justifies all the
>>> troubles of keeping the IRP, vs allocating when needed and freing
>>> immediately when done?
>>>
>>> "Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
>>> news:uwqWJSHLGHA.4052@TK2MSFTNGP15.phx.gbl...
>>>> not true. for instance if you are polling a device, you keep the irp
>>>> around until you get a pnp remove. look at the mouser example. it has
>>>> one PIRP which it allocates on start and in the completion routines,
>>>> calls IoReinitializeIrp, reformats the irp and resends it.
>>>>
>>>> d
>>>>
>>>> --
>>>> Please do not send e-mail directly to this alias. this alias is for
>>>> newsgroup purposes only.
>>>> This posting is provided "AS IS" with no warranties, and confers no
>>>> rights.
>>>>
>>>>
>>>> "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
>>>> news:uar%2373GLGHA.536@TK2MSFTNGP09.phx.gbl...
>>>>>I don't think there is any gain in reusing an IRP. It will involve some
>>>>>kind of lookaside list, IoReinitializeIrp, that is same expenses as
>>>>>just IoFreeIrp+IoAllocateIrp.
>>>>>
>>>>> "Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
>>>>> news:%23a$wiOFLGHA.1536@TK2MSFTNGP11.phx.gbl...
>>>>>> I would forget IoInitializeIrp forever. Never had any need in this
>>>>>> routine.
>>>>>>
>>>>>> --
>>>>>> Maxim Shatskih, Windows DDK MVP
>>>>>> StorageCraft Corporation
>>>>>> maxim@storagecraft.com
>>>>>>
http://www.storagecraft.com
>>>>>>
>>>>>> "SL" <slchang@sq.com.tw> wrote in message
>>>>>> news:OOZ9fq5KGHA.2276@TK2MSFTNGP15.phx.gbl...
>>>>>>> Hi all,
>>>>>>> the DDk document say that "Do not use IoInitializeIrp to initialize
>>>>>>> the IRP
>>>>>>> before its first use".
>>>>>>> If I misuse IoInitializeIrp next to IoAllocateIrp will cause any
>>>>>>> problem ?
>>>>>>> Is it possible to cause system crash ?
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>