Can not use ObOpenObjectByPointer with folders

Dear All,
During delete operation (IRP_MJ_SET_INFORMATION with FileDispositionInformation) ObOpenObjectByPointer hangs when I pass pointer to the directory FILE_OBJECT. (I need to get full path name of the file or folder (I use call to ZwQueryInformationFile with FileNameInformation)) What I do wrong? It works when I use this function with files. ObQueryNameString hangs too when it used with folders.
The same functions hangs when I try to find out full path name (in the same way) during rename operation (IRP_MJ_SET_INFORMATION with FileRenameInformation) but with files and folders.
call to function with such parameters:
res = ObOpenObjectByPointer(file_object,OBJ_KERNEL_HANDLE,0,0,0,KernelMode,&file_handle);

I don’t know why ObOpenObjectByPointer is hanging but I would avoid
trying to reopen the file. It is simpler and more efficient to generate
your own query information IRP and use the file object from the original
operation. Look at the IFSKit samples on how to generate this IRP.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@univ.kiev.ua
Sent: Thursday, December 23, 2004 5:13 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Can not use ObOpenObjectByPointer with folders

Dear All,
During delete operation (IRP_MJ_SET_INFORMATION with
FileDispositionInformation) ObOpenObjectByPointer hangs when I pass
pointer to the directory FILE_OBJECT. (I need to get full path name of
the file or folder (I use call to ZwQueryInformationFile with
FileNameInformation)) What I do wrong? It works when I use this function
with files. ObQueryNameString hangs too when it used with folders.
The same functions hangs when I try to find out full path name (in the
same way) during rename operation (IRP_MJ_SET_INFORMATION with
FileRenameInformation) but with files and folders.
call to function with such parameters:
res =
ObOpenObjectByPointer(file_object,OBJ_KERNEL_HANDLE,0,0,0,KernelMode,&fi
le_handle);


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com