From: h.wulff on
Hi!

I'm looking for a way to provide custom file attributes to user mode
applications by a redir. I found two possibilities so far:

1.)
To provide more memory to NtQueryInformationFile() then a regular (for
example FileBasicInformation) file information class requires. So that
the redir can add the file attributes on top of FileBasicInformation.

2.)
Create a new (custom) file information class.

I prefer the 2. way because it is the clean and straight forward way.
But this may give problems in future versions of windows, except there
are ranges for custom file information classes (like Microsoft did with
custom NTSTATUS values).

Any hints or ideas?
Thanks!
--
h.wulff
From: Don Burn on
Either one is stretching the interface in ways that will probably cause
problems. Have you considered providing a custom FSCTL for getting the
additional attributes? This is clean and legal in all cases.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"h.wulff" <zuhause(a)aol.com> wrote in message
news:egqndr$gtd$1(a)news.shlink.de...
> Hi!
>
> I'm looking for a way to provide custom file attributes to user mode
> applications by a redir. I found two possibilities so far:
>
> 1.)
> To provide more memory to NtQueryInformationFile() then a regular (for
> example FileBasicInformation) file information class requires. So that
> the redir can add the file attributes on top of FileBasicInformation.
>
> 2.)
> Create a new (custom) file information class.
>
> I prefer the 2. way because it is the clean and straight forward way. But
> this may give problems in future versions of windows, except there are
> ranges for custom file information classes (like Microsoft did with
> custom NTSTATUS values).
>
> Any hints or ideas?
> Thanks!
> --
> h.wulff


From: h.wulff on
Yes, I have. Getting the custom file attributes via a custom FSCTL
breaks, in my eyes, the way windows is getting file attributes in
general. I mean the infrastructure for getting file attributes is
already there and for FSCTLs I have to somehow re-implement creating
contexes, getting connection object and building remote path. That is
why I try to avoid FSCTLs and prefer the way via NtCreateFile() and
NtQueryInformationFile().

--
h.wulff

Don Burn wrote:
> Either one is stretching the interface in ways that will probably cause
> problems. Have you considered providing a custom FSCTL for getting the
> additional attributes? This is clean and legal in all cases.
>
>