FSCTL_GET_RETRIEVAL_POINTERS

Wondered how I can get the handle of the file in the IRP_MJ_WRITE callback - so that I can call Device IoControl with FSCTL_GET_RETRIEVAL_POINTERS.

Thanks,

Ben.

Can you just call FltFsControlFile() to send down
FSCTL_GET_RETRIEVAL_POINTERS?

If you need a handle, then try ObOpenObjectByPointer().

On Thu, Dec 2, 2010 at 1:49 PM, wrote:

> Wondered how I can get the handle of the file in the IRP_MJ_WRITE callback
> - so that I can call Device IoControl with FSCTL_GET_RETRIEVAL_POINTERS.
>
> Thanks,
>
> Ben.
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

No need for the handle
http://msdn.microsoft.com/en-us/library/ff545421(VS.85).aspx :slight_smile:

wrote in message news:xxxxx@ntfsd…

Wondered how I can get the handle of the file in the IRP_MJ_WRITE callback -
so that I can call Device IoControl with FSCTL_GET_RETRIEVAL_POINTERS.

Thanks,

Ben.

If OP wants to use ZwFsControlFile(), then he does need the file handle.

On Thu, Dec 2, 2010 at 2:38 PM, Lyndon J. Clarke > wrote:

> No need for the handle
> http://msdn.microsoft.com/en-us/library/ff545421(VS.85).aspx :slight_smile:
>
> wrote in message news:xxxxx@ntfsd…
>
>
> Wondered how I can get the handle of the file in the IRP_MJ_WRITE callback
> - so that I can call Device IoControl with FSCTL_GET_RETRIEVAL_POINTERS.
>
> Thanks,
>
> Ben.
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

The OP should call FltFsControlFile and not ZwFsControlFile since they
mentioned they are in a callback and calling ZwFsControlFile would break
layering.

Thanks,

Alex.

Thanks Mate. Still find it weird that we’re not talking about load testing. Any kids? Are you living in Ed?

From: xxxxx@neverfailgroup.com
Subject: Re:[ntfsd] FSCTL_GET_RETRIEVAL_POINTERS
Date: Thu, 2 Dec 2010 19:38:40 +0000
To: xxxxx@lists.osr.com

No need for the handle
http://msdn.microsoft.com/en-us/library/ff545421(VS.85).aspx :slight_smile:

wrote in message news:xxxxx@ntfsd…

Wondered how I can get the handle of the file in the IRP_MJ_WRITE callback -
so that I can call Device IoControl with FSCTL_GET_RETRIEVAL_POINTERS.

Thanks,

Ben.


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Oops. Fallen foul of reply to all! Anyway, thanks everyone for the help.

For me, the real questions are “when?” (hoping not paging path) and “why?”
(postop path the result might already be stale).

wrote in message news:xxxxx@ntfsd…

Oops. Fallen foul of reply to all! Anyway, thanks everyone for the help.