Hi all,
Is the best way to get a valid FILE_OBJECT from a HANDLE
(returned by ZwCreateFile) to use ObReferenceObjectByHandle? I have
opened a file using ZwCreatFile, and want a FILE_OBJECT in order to send
IRPS at a later time in a process independent manner. Will this work?
Thanks,
Matt
>Is the best way to get a valid FILE_OBJECT from a HANDLE
(returned by ZwCreateFile) to use ObReferenceObjectByHandle? I have
It is the only documented way to get FILE_OBJECT from handle.
opened a file using ZwCreatFile, and want a FILE_OBJECT in order to send
IRPS at a later time in a process independent manner. Will this work?
Yes, it will work if you keep the handle opened.
Alexei.
If the IRPs you want to send are noncached ones - then yes. I have
doubts that usual reads/writes will be successful after CLEANUP, since
the FSD will tear the cache away in CLEANUP path.
Max
----- Original Message -----
From: “Matthew White”
To: “File Systems Developers”
Sent: Tuesday, May 20, 2003 7:51 PM
Subject: [ntfsd] Easiest way to get FILE_OBJECT from HANDLE?
> Hi all,
> Is the best way to get a valid FILE_OBJECT from a HANDLE
> (returned by ZwCreateFile) to use ObReferenceObjectByHandle? I have
> opened a file using ZwCreatFile, and want a FILE_OBJECT in order to
send
> IRPS at a later time in a process independent manner. Will this
work?
>
> Thanks,
> Matt
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
>
> If the IRPs you want to send are noncached ones - then yes. I have
If you close the handle, file system will reject all IRP, including
noncached ones, except PagingIO and IRP_MJ_CLOSE (take a look at
FatVerifyOperationIsLegal in FAT source code).
You have to keep the handle that was used to get file object opened in order
to use the file object.
Alexei.
I wonder who Lou is, because it seems Microsoft made all query/set
operations an exception to this rule just for him.
(Line 1340,
verfysup.c, wnet source).
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alexei Jelvis
Sent: Tuesday, May 20, 2003 8:02 PM
To: File Systems Developers
Subject: [ntfsd] Re: Easiest way to get FILE_OBJECT from HANDLE?
“Maxim S. Shatskih” wrote in message
> news:xxxxx@ntfsd…
> >
> > If the IRPs you want to send are noncached ones - then yes. I have
>
> If you close the handle, file system will reject all IRP,
> including noncached ones, except PagingIO and IRP_MJ_CLOSE
> (take a look at FatVerifyOperationIsLegal in FAT source
> code). You have to keep the handle that was used to get file
> object opened in order to use the file object.
>
> Alexei.
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>