Pseudocode for the operation is as follows:
If OutputBufferSize is smaller than sizeof(FILE_STANDARD_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.
OutputBuffer MUST be constructed as follows:
If Open.Stream.StreamType is DirectoryStream, set OutputBuffer.Directory to 1 else 0.
If Open.Stream.StreamType is DirectoryStream or Open.Stream.Name is empty:
If Open.Link.IsDeleted is TRUE, set OutputBuffer.DeletePending to 1 else 0.
If Open.Stream.IsDeleted is TRUE, set OutputBuffer.DeletePending to 1 else 0.
OutputBuffer.NumberOfLinks set to the number of Link elements in Open.File.LinkList, except if Link.IsDeleted field is TRUE (that is, the number of not-deleted links to the file).<126>
If OutputBuffer.NumberOfLinks is 0, set OutputBuffer.DeletePending to 1.
OutputBuffer.AllocationSize set to Open.Stream.AllocationSize.
OutputBuffer.EndOfFile set to Open.Stream.Size.
Upon successful completion of the operation, the object store MUST return:
ByteCount set to sizeof(FILE_STANDARD_INFORMATION).
Status set to STATUS_SUCCESS.