NtReadFile with named pipe

Hi.

I’m opening named pipe for both reading and writing datas. On reading I get
STATUS_PENDING. Is there any way to syncronize reading. I have to free
allocated buffer after read operation.

What is the best way to wait on completition?

Thanx in advance.

You can wait on the file/pipe handle itself or else you can specify an
handle to an event object in the NtReadFile api… Wait on that event object
will also work . You can also specify an APC routine which will be called
when the NtReadFile returns
-Kiran

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dmitriy Gubarkov
Sent: Tuesday, May 10, 2005 3:02 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] NtReadFile with named pipe

Hi.

I’m opening named pipe for both reading and writing datas. On reading I get
STATUS_PENDING. Is there any way to syncronize reading. I have to free
allocated buffer after read operation.

What is the best way to wait on completition?

Thanx in advance.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@calsoftinc.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

Thanx for reply.

Where can I check for example on using an APC routine?

“Kiran Joshi” ???/??? ? ??? ???:
news:xxxxx@ntdev…
> You can wait on the file/pipe handle itself or else you can specify an
> handle to an event object in the NtReadFile api… Wait on that event
> object
> will also work . You can also specify an APC routine which will be called
> when the NtReadFile returns
> -Kiran
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Dmitriy Gubarkov
> Sent: Tuesday, May 10, 2005 3:02 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] NtReadFile with named pipe
>
> Hi.
>
> I’m opening named pipe for both reading and writing datas. On reading I
> get
> STATUS_PENDING. Is there any way to syncronize reading. I have to free
> allocated buffer after read operation.
>
> What is the best way to wait on completition?
>
> Thanx in advance.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@calsoftinc.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Set an IoCompletion routine.

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dmitriy Gubarkov
Sent: Tuesday, May 10, 2005 4:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] NtReadFile with named pipe

Hi.

I’m opening named pipe for both reading and writing datas. On reading I get
STATUS_PENDING. Is there any way to syncronize reading. I have to free
allocated buffer after read operation.

What is the best way to wait on completition?

Thanx in advance.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: glittle@mn.rr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

__________ NOD32 1.1091 (20050509) Information __________

This message was checked by NOD32 antivirus system.
http://www.nod32.com

Open with FILE_SYNCHRONOUS_IO_NONALERT.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Dmitriy Gubarkov”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Tuesday, May 10, 2005 1:31 PM
Subject: [ntdev] NtReadFile with named pipe

> Hi.
>
> I’m opening named pipe for both reading and writing datas. On reading I get
> STATUS_PENDING. Is there any way to syncronize reading. I have to free
> allocated buffer after read operation.
>
> What is the best way to wait on completition?
>
> Thanx in advance.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com