Hi all,
I was just wondering when IO Manager creates FileObject on CreateFile() call
from the user application, how can user pass some open structure as a part
of the FsContext field of the FileObject? Like can user pass a specific
structure as a part of this field to the driver.
Thanks a lot,
Rajinder
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
> from the user application, how can user pass some open structure as a part
of the FsContext field of the FileObject? Like can user pass a specific
The user cannot. NT’s memory manager and cache manager mandate the FsContext
field to point to some predefined structure in order to support caching and
memory mapping of the file.
The structure is called FSRTL_COMMON_FCB_HEADER, has one instance for each
on-disk file name (regardless of the number of opens), and contains the file
sizes and 2 resource locks needed to guard file sizes + some other
information (namely - the MM’s context for a memory mapped file - which is
pointed to by SECTION_OBJECT_POINTERS).
If your driver does not support memory mapped files, caching and has no
notion of the file stream size - then you can use FsContext as you want.
IIRC TDI protocol drivers use FsContext to point to their private connection
data.
Max