unique id of a file

Hi. all.

can i use a unique id for IO_STACK_LOCATION’s FileObject ?
or what is it? (FileObject->FsContext ?)

Best Regards, park.

>> unique id for IO_STACK_LOCATION’s FileObject ?

What do you mean ? you want a unique identifier for a io stack location ? This aint possible. They come and go. Or to use a PFILE_OBJECT as a unique id to track state ? This is possible, if you choose to track state based on file objects and not file streams. However you should not, unless you have very serious reasons to do this.

> FileObject->FsContext ?)

FileObject->FsContext stores a pointer to a file control block. The file control block is allocated and maintained by the file system itself. You can safelly assume that the first data member into this block is a FSRTL_COMMON_FCB_HEADER, because both Cc and Mm requires this. However , you should consider the rest of the structure opaque, for it is file system dependant.
FileObject->FsContext is not unique for every file object. It is unique for every file stream, but multiple file objects which represents the same file stream will have the FsContext pointer pointing to the same control block.This is OK, because most of the file system filter drivers are supposed to maintain state based on tracking file streams and not file objects. Do not confuse a file stream with a stream file object, they are different animals.
----- Original Message -----
From: gyver-park
To: File Systems Developers
Sent: Saturday, July 13, 2002 2:17 PM
Subject: [ntfsd] unique id of a file

Hi. all.

can i use a unique id for IO_STACK_LOCATION’s FileObject ?
or what is it? (FileObject->FsContext ?)

Best Regards, park.

b??箷????vڵ???ʷ??N???zǧu?jy???j???vBX???&