ZwReadFile Lock

Hi,

I’m trying to some data from a pipe by using ZwReadFile during a
IRP_MJ_READ completion routine. I get a lock on the ZwReadFile function.
Please can you help me.

Thanks,
Pascal.

First of all , calling ZwReadFile in a completion routine is illegal. Thats
because a completion routine can be called at DISPATCH level, and ZwRead…
should be called at passive. About locks: generaly , a FILE_OBJECT will be
acquired exclusively if it has FO_SYNCHRONOUS_IO flags options set, by any
of the ZwXxxxXxxx IO routines. This operation cannot be performed at
dispatch level , for a wait interval != 0. Also , FSD design prohibits calls
at dispatch. If the pipe provider device is yours , you could make a private
arrangemement with it to work properly at dispatch , by modifing it to
support reads at dispatch, but Id say modify your driver design to
circumvent this issue.

----- Original Message -----
From: “Vantrepote”
To: “File Systems Developers”
Sent: Monday, February 25, 2002 5:29 PM
Subject: [ntfsd] ZwReadFile Lock

> Hi,
>
> I’m trying to some data from a pipe by using ZwReadFile during a
> IRP_MJ_READ completion routine. I get a lock on the ZwReadFile function.
> Please can you help me.
>
> Thanks,
> Pascal.
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>