I’m probably missing something really basic here, but here goes.
I’ve got a minifilter where I’ve declared a GenerateFileNameCallback routine.
For initial prototyping this function just calls
FltGetFileNameInformation and returns the name member of the
FLT_FILE_NAME_INFORMATION structure that this function returns.
However I’m finding that when I call FltGetFileNameInformation from my
GenerateFileName callback routine, there is a recursive call made into
my GenerateFileNameCallback routine.
The IFS kit documentation for the GenerateFileNameCallback states:
“When this callback routine is invoked, the minifilter generates its
own file name information, based on the file system’s file name
information for the file. To get the file system’s file name
information for a file, call FltGetFileNameInformation,
FltGetFileNameInformationUnsafe, or
FltGetDestinationFileNameInformation.”
I am passing FLT_FILE_NAME_OPENED as the file name format to
FltGetFileNameInformation. Despite experimenting with various
combinations of query methods and name flags, I still get recursive
calls made by the filter manager into my GenerateFileNameCallback
routine. I would have expected to use
FLT_FILE_NAME_QUERY_FILESYSTEM_ONLY | FLT_FILE_NAME_DO_NOT_CACHE
however I am still getting recursion on that call. The CallbackData
pointer to FltGetFileNameInformation is that which is passed to my
GenerateFileNameCallback routine.
I have not defined a GenerateDestinationFileName or a
NormalizeNameComponent callback function.
There is no documentation either in the DDK or online that I can see
about about recursion being something to deal with in the
GenerateFileNameCallback routine. Is there something that I am
missing, or is recursion infact something that needs to be considered
when designing this routine, or have I missed something fundamental?
For example do I need to build the name up without using the
FltGetFileNameInformation function altogether?
Any information that can be provided will be very welcome.
On a side note in the PowerPoint slide deck: “File Name Management” it
mentions that a name provider sample is coming. Is this something
that we can expect anytime soon?
Thanks
Lee