From: btl on
Thanks ray.

now i have additional question -
Shall i send syncronic (using IoBuildDeviceIoControlRequest)
or asyncronic (using IoAllocateIrp) request ?

From: tamar on
Thanks, ray.

I have additional question
shall i send a synchronic IRP ( build using
IoBuildDeviceIoControlRequest )
or asynchronic one (build using IoAllocateIrp ) ?

Tamar.

From: Doron Holan [MS] on
i think you should send an asynchronous request

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.


"tamar" <tamarlev(a)hotmail.com> wrote in message
news:1122909416.395152.295710(a)f14g2000cwb.googlegroups.com...
> Thanks, ray.
>
> I have additional question
> shall i send a synchronic IRP ( build using
> IoBuildDeviceIoControlRequest )
> or asynchronic one (build using IoAllocateIrp ) ?
>
> Tamar.
>


From: Ray Trent on
Doron Holan [MS] wrote:
>> I have additional question
>> shall i send a synchronic IRP ( build using
>> IoBuildDeviceIoControlRequest )
>> or asynchronic one (build using IoAllocateIrp ) ?
>>
>> Tamar.
>
> i think you should send an asynchronous request

He should certainly *send it* asynchronously (it's always going to
return STATUS_PENDING if it succeeds anyway, so there's not much real
choice, except whether you wait on the event or set a completion routine).

But isn't IoBuildDeviceIoControlRequest a much easier way to create this
IRP than calling IoAllocateIrp and filling in everything by hand (and
hoping you get everything right)?

Or maybe I'm missing some subtlety :-).
--
.../ray\..
From: Doron Holan [MS] on
IoBuildDeviceIoControlRequest is a threaded IRP API, the irp must be
completed on the same thread. from MSDN:

The IoBuildDeviceIoControlRequest routine allocates and sets up an IRP for a
synchronously processed device control request

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.


"Ray Trent" <rat(a)nospam.nospam> wrote in message
news:%23GlWYsvlFHA.2904(a)TK2MSFTNGP14.phx.gbl...
> Doron Holan [MS] wrote:
>>> I have additional question
>>> shall i send a synchronic IRP ( build using
>>> IoBuildDeviceIoControlRequest )
>>> or asynchronic one (build using IoAllocateIrp ) ?
>>>
>>> Tamar.
> >
>> i think you should send an asynchronous request
>
> He should certainly *send it* asynchronously (it's always going to return
> STATUS_PENDING if it succeeds anyway, so there's not much real choice,
> except whether you wait on the event or set a completion routine).
>
> But isn't IoBuildDeviceIoControlRequest a much easier way to create this
> IRP than calling IoAllocateIrp and filling in everything by hand (and
> hoping you get everything right)?
>
> Or maybe I'm missing some subtlety :-).
> --
> ../ray\..