FILE_OBJECT.RelatedFileObject->FileName

Hello,
In a create dispatch routine, if
CurrentStackLocation->FileObject->RelatedFileObject is non-null, can I
assume that the
CurrentStackLocation->FileObject->RelatedFileObject->FileName field is valid
(i.e. the Buffer has not been freed at some time after that file object’s
creation)?
Thanks,
Joel

No, you can’t make any assumptions about RelatedFileObject->FileName field
at all! In fact, you can “trust” FileObject->FileName field only in Create
dispatch for
*that* file object and *before* you call IoCallDriver() passing the IRP down
the
chain of drivers. Also true for FastOpen (I believe).

Regards,

Vladimir

-----Original Message-----
From: Smith, Joel [mailto:xxxxx@ntpsoftware.com]
Sent: Monday, May 22, 2000 3:29 PM
To: File Systems Developers
Subject: [ntfsd] FILE_OBJECT.RelatedFileObject->FileName

Hello,
In a create dispatch routine, if
CurrentStackLocation->FileObject->RelatedFileObject is non-null, can I
assume that the
CurrentStackLocation->FileObject->RelatedFileObject->FileName field is valid
(i.e. the Buffer has not been freed at some time after that file object’s
creation)?

Thanks,
Joel