Virtual directory

Hi!

Where can I found a example with source code to a “Virtual Directory” ?

I found many examples to virtual drives, like FileDisk, but I dont found
nothing with virtual directories… the functionality is the same… all
access in a directory is redirected to one file…

Where can I found examples ?

I think make a “virtual directory” inside a USB stick and all access inside this virtual directory is reditected to one file…

Thank you

this can be done with returning STATUS_REPARSE from IRP_MJ_CREATE operation
and in IRP_MJ_SET_INFORMATION you need to handle enumerations (e.g. add your
virtual folder to the returning results, etc)

Petr

wrote in message news:xxxxx@ntfsd…
> Hi!
>
> Where can I found a example with source code to a “Virtual Directory” ?
>
> I found many examples to virtual drives, like FileDisk, but I dont found
> nothing with virtual directories… the functionality is the same… all
> access in a directory is redirected to one file…
>
> Where can I found examples ?
>
> I think make a “virtual directory” inside a USB stick and all access
> inside this virtual directory is reditected to one file…
>
> Thank you
>
>
>

well, I overlooked the fact, you need to redirect i/o operations to one
file.
I’d say, you need to handle irp_mj_create (return own handle), handle
read/write (just redirect them to your file with the own specific
structure), handle irp_mj_set_information (enumeration), and other file
system irps
there may be a problem how to expand the file size (if you use e.g.
fat32/root sections, the files can be divided on many places in the one
file)

“Petr Kurtin” wrote in message news:xxxxx@ntfsd…
> this can be done with returning STATUS_REPARSE from IRP_MJ_CREATE
> operation
> and in IRP_MJ_SET_INFORMATION you need to handle enumerations (e.g. add
> your virtual folder to the returning results, etc)
>
> Petr
>
> wrote in message news:xxxxx@ntfsd…
>> Hi!
>>
>> Where can I found a example with source code to a “Virtual Directory” ?
>>
>> I found many examples to virtual drives, like FileDisk, but I dont found
>> nothing with virtual directories… the functionality is the same… all
>> access in a directory is redirected to one file…
>>
>> Where can I found examples ?
>>
>> I think make a “virtual directory” inside a USB stick and all access
>> inside this virtual directory is reditected to one file…
>>
>> Thank you
>>
>>
>>
>
>
>