Re: IRP_MJ_CLEANUP and FileObject->FsContext is NULL? ?

No, that guess is not correct. When you see these IRP_MJ_CLEANUP
operations on stream file objects created with IoCreateStreamFileObject,
the FileObject->FsContext will always be NULL. The file objects created
by IoCreateStreamFileObject or IoCreateStreamFileObjectLite are only
initialized with respect to the Object Manager and IO Manager, i.e.,
these are well-formed NT objects with the basic file object information
filled. The file system has not yet initialized the file system
specific fields, i.e., FsContext.

The best way to identify these stream file objects is to look for the
FO_STREAM_FILE flag set in FileObject->Flags.

Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no

-----Original Message-----
[] On Behalf Of Lyndon J. Clarke
Sent: Friday, October 24, 2003 2:38 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Re: IRP_MJ_CLEANUP and FileObject->FsContext is NULL? ?

Thanks Tony. I think I understand this now! Would I be right if I
guessed that this was a case where IoCreateStreamFileObject had been
called with the FileObject parameter value NULL?

You are currently subscribed to ntfsd as:
To unsubscribe send a blank email to

Hi Molly. Many thanks for a clear and complete explanation. Now, mr slow
brain does understand :slight_smile: