Setting named pipe to nonblocking

I have created a driver that connects to a named pipe (using ZwCreateFile),
and the reads from it( using ZwReadFile). The read is
blocking though. I have played with some of the flags in ZwCreateFile and
gotten it to not block, but then I keep getting STATUS_PENDING even when
there is data present. Any help on how to properly set the pipe to
nonblocking would be appreciated.

Thanks